Code Search for Developers
 
 
  

lock.c-annot.html from CQual at Krugle


Show lock.c-annot.html syntax highlighted

<html>
<body bgcolor="white">
<pre>
typedef struct {
  volatile unsigned int lock;
} spinlock_t;

void spin_lock(<font color=green>$unlocked</font> spinlock_t *lock) {
  /* assembly code */
  change_type(*lock, <font color=red>$locked</font> spinlock_t);
}

void spin_unlock(<font color=red>$locked</font> spinlock_t *lock) {
  /* assembly code */
  change_type(*lock, <font color=green>$unlocked</font> spinlock_t);
}

<font color=green>$unlocked spinlock_t</font> rtc_lock;

int main(void)
{
  rtc_lock;
  spin_lock(&rtc_lock);
  rtc_lock;
  spin_unlock(&rtc_lock);
  rtc_lock;
}
</pre>
</body>
</html>




See more files for this project here

CQual

CQual - A tool for adding type qualifiers to C

Project homepage: http://sourceforge.net/projects/cqual
Programming language(s): C,Java,Shell Script
License: other

  cqual.html
  lock.c
  lock.c-annot.html
  lock.c-explain.html
  lock.c-orig.html
  lock.c.html
  taint.c
  taint.c-annot.html
  taint.c-explain.html
  taint.c-orig.html
  taint.c.html
  taint2.c
  taint2.c-annot.html
  taint2.c-explain.html
  taint2.c-orig.html
  taint2.c.html
  tutorial.html