Hi,
I think the answer depends on the platform that you will use for the semaphor.
If it is an embebed system, you must think in an RTOS, depending on the micro that you will use, you can find many RTOS framworks (ex. Slavo for PIC, ...)
If you whan to use a PC or something simillar (a PC/104, a Java enabled processor, ...) you can use Languages such Java that disponibilize threads that can be sincronized, and you can use the system timer events.
Hope helps,
NeuralC