Last change
on this file since 66 was 66, checked in by Marek Kurdej, 12 years ago |
Documentation: file info.
|
-
Property svn:keywords
set to
Id
|
File size:
1007 bytes
|
Rev | Line | |
---|
[62] | 1 | // This file is part of the PACPUS framework distributed under the
|
---|
| 2 | // CECILL-C License, Version 1.0.
|
---|
| 3 | //
|
---|
[66] | 4 | /// @file
|
---|
[62] | 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.
|
---|
[3] | 12 |
|
---|
[31] | 13 | #ifndef DEF_PACPUS_POSIXSHMEM_H
|
---|
| 14 | #define DEF_PACPUS_POSIXSHMEM_H
|
---|
[3] | 15 |
|
---|
[31] | 16 | #include <QSharedMemory>
|
---|
| 17 | #include <QSystemSemaphore>
|
---|
[3] | 18 |
|
---|
[31] | 19 | #include <Pacpus/PacpusTools/ShMemBase.h>
|
---|
[3] | 20 |
|
---|
| 21 | class PosixShMem
|
---|
| 22 | : public ShMemBase
|
---|
| 23 | {
|
---|
| 24 | public:
|
---|
| 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 |
|
---|
| 34 | private:
|
---|
| 35 | QSystemSemaphore * event_;
|
---|
| 36 | QSharedMemory * memory_;
|
---|
| 37 | };
|
---|
| 38 |
|
---|
[31] | 39 | #endif // DEF_PACPUS_POSIXSHMEM_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.