2

Are there any counted semaphores in Linux?

What I'm wanting to do is keep track of how many readers a resource has.

Femaref
  • 60,705
  • 7
  • 138
  • 176
hookenz
  • 36,432
  • 45
  • 177
  • 286

1 Answers1

1

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.

Community
  • 1
  • 1
Lee
  • 13,462
  • 1
  • 32
  • 45