12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #ifndef __SHM_H__
- #define __SHM_H__
- #pragma once
- #ifndef _WIN32
- #include <sys/shm.h>
- #else
- #include "config.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- /*-------------------------------------------------------------------------
- *
- * shmem.c
- * Microsoft Windows Win32 Shared Memory Emulation
- *
- *-------------------------------------------------------------------------
- */
- #define IPC_RMID 256
- #define IPC_CREAT 512
- #define IPC_EXCL 1024
- #define IPC_PRIVATE 234564
- #define IPC_NOWAIT 2048
- #define IPC_STAT 4096
- #define SHM_RDONLY 010000
- /*
- * Shared memory
- */
- struct shmid_ds
- {
- int dummy;
- int shm_nattch;
- };
- TOOLKIT_API int shmdt(const void* shmaddr);
- TOOLKIT_API void* shmat(int memId, void* shmaddr, int flag);
- TOOLKIT_API int shmctl(int shmid, int flag, struct shmid_ds* dummy);
- TOOLKIT_API int shmget(int memKey, int size, int flag);
- #ifdef __cplusplus
- } // extern "C" {
- #endif
- #endif //_WIN32
- #endif //__SHM_H__
|