lksmith icon indicating copy to clipboard operation
lksmith copied to clipboard

Semaphore support

Open praetp opened this issue 10 years ago • 1 comments

Hi, I was trying out your library but as mentioned it does not support semaphores. Do you think this would be hard to do ? Otherwise I might consider adding it.. Did not have a look at the source code though.

praetp avatar Apr 03 '15 14:04 praetp

Hi spetsnaz84,

I think it would be relatively easy to treat semaphores similar to how I treat mutexes currently. The main difference is that semaphores can be released from threads other than the thread that acquired them, without causing undefined behavior. Otherwise, they are just the same as recursive mutexes.

best, Colin

cmccabe avatar Apr 04 '15 06:04 cmccabe