开发者

Counted semaphore in Linux?

开发者 https://www.devze.com 2023-01-23 20:06 出处:网络
Are there any counted semaphores in Linux? What I\'开发者_StackOverflow中文版m wanting to do is keep track of how many readers a resource has.POSIX semaphores

Are there any counted semaphores in Linux?

What I'开发者_StackOverflow中文版m wanting to do is keep track of how many readers a resource has.


POSIX semaphores


You might also consider the Boost C++ Libraries. Boost has a bunch of different threading and synchronization related components, including an abstraction for semaphores, and also a good implementation of the ReaderWriterLock. Check out this SO post, regarding Boost ReaderWriterLock.

0

精彩评论

暂无评论...
验证码 换一张
取 消