Introduction   API Reference   Examples   Index  

Examples

Lock Example

#include <l4/lock/lock.h>

l4lock_t lock = L4LOCK_UNLOCKED;

void test(void)
{
  // enter the critical section
  l4lock_lock(&lock);

  // do the critical stuff

  // leave the critical section
  l4lock_unlock(&lock);
}

L4 Lock Reference Manual, written by Lars Reuther  © 2000-2003