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

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

Documentation: file info.

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