RIOT-OS/RIOT — pull request #811 by Kijewski (2014-02-28 00:48:16+00:00)
Title: vtimer: Add `vtimer_set_wakeup2()`

`vtimer_set_wakeup()` wakes up the calling thread after N ticks. But if
you want to use this function to implement a timeout, then you are out
of luck. There is no way to differentiate between a wakeup through
`vtimer_set_wakeup()` or another thread using `thread_wakeup()`.

This patch introduces `vtimer_set_wakeup2()` which takes an addition
paramter `activated_by_vtimer` which gets set to 1 before wakte up the
thread. As long as the time is not up, the value is left unchanged.

This also allows "misusing" the function in a busy loop which tests if
the content was changed.