Files
interprocess/doc/code/doc_anonymous_semaphore_shared_data.hpp
Ion Gaztañaga 4ed08b24a6 First complete documentation version
[SVN r34817]
2006-08-04 19:14:25 +00:00

18 lines
414 B
C++

#include <boost/interprocess/sync/interprocess_semaphore.hpp>
struct shared_memory_buffer
{
enum { NumItems = 10 };
shared_memory_buffer()
: mutex(1), nempty(NumItems), nstored(0)
{}
//Semaphores to protect and synchronize access
boost::interprocess::interprocess_semaphore
mutex, nempty, nstored;
//Items to fill
int items[NumItems];
};