source: pacpusframework/trunk/include/Pacpus/PacpusTools/PosixShMem.h@ 64

Last change on this file since 64 was 64, checked in by Marek Kurdej, 11 years ago

Modified property: added svn:keywords=Id.

  • Property svn:keywords set to Id
File size: 996 bytes
Line 
1// This file is part of the PACPUS framework distributed under the
2// CECILL-C License, Version 1.0.
3//
4/// @author Firstname Surname <firstname.surname@utc.fr>
5/// @date Month, Year
6/// @version $Id: PosixShMem.h 64 2013-01-09 16:41:12Z kurdejma $
7/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
8/// @brief Brief description.
9///
10/// Detailed description.
11
12#ifndef DEF_PACPUS_POSIXSHMEM_H
13#define DEF_PACPUS_POSIXSHMEM_H
14
15#include <QSharedMemory>
16#include <QSystemSemaphore>
17
18#include <Pacpus/PacpusTools/ShMemBase.h>
19
20class PosixShMem
21 : public ShMemBase
22{
23public:
24 PosixShMem(const char * name, int size);
25 virtual ~PosixShMem();
26
27 virtual void *read();
28 virtual void write(void *data, int size, unsigned long offset = 0);
29 virtual bool wait(unsigned long timeout = 0);
30 virtual void lockMemory();
31 virtual void unlockMemory();
32
33private:
34 QSystemSemaphore * event_;
35 QSharedMemory * memory_;
36};
37
38#endif // DEF_PACPUS_POSIXSHMEM_H
Note: See TracBrowser for help on using the repository browser.