contiki-os/contiki — pull request #716 by hexluthor (2014-06-11 21:51:26+00:00)
Title: Make protothread semaphores interrupt-safe.

Using PT_SEM_SIGNAL() within an interrupt service routine can cause a race condition if the counter decrement is not an atomic operation. Representing the semaphore count as a difference between two separate counters prevents such a race condition from occurring and makes PT_SEM_SIGNAL() interrupt-safe.