Ignore:
Timestamp:
03/01/17 14:36:10 (5 years ago)
Author:
Bayard Gildas
Message:

SharedMem in producerConsumer mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/unexported/SharedMem_impl.h

    r15 r149  
    2323#endif
    2424
    25 namespace flair {
    26 namespace core {
    27 class SharedMem;
    28 }
    29 }
     25#include <SharedMem.h>
    3026
    3127/*! \class SharedMem_impl
     
    3733public:
    3834  SharedMem_impl(const flair::core::SharedMem *self, std::string name,
    39                  size_t size);
     35                 size_t size, flair::core::SharedMem::Type &type);
    4036  ~SharedMem_impl();
    4137
    4238  void Write(const char *buf, size_t size);
    4339  void Read(char *buf, size_t size);
     40  void ReaderReady();
    4441
    4542private:
    4643  const flair::core::SharedMem *self;
     44  flair::core::SharedMem::Type type;
    4745  size_t size;
    4846  char *mem_segment;
     
    5452#else
    5553  int fd;
    56   sem_t *sem;
     54  sem_t *sem,*sem_producer,*sem_consumer;
    5755  std::string sem_name, shm_name;
     56  std::string sem_name_producer,sem_name_consumer;
    5857#endif
    5958};
Note: See TracChangeset for help on using the changeset viewer.