Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

RCRegion.h File Reference


Detailed Description

Describes RCRegion, which provides compatability with the OPEN-R type of the same name.

Author:
ejt (Creator)
Author
ejt
Name
tekkotsu-4_0
Revision
1.12
State
Exp
Date
2007/11/13 16:17:46

Definition in file RCRegion.h.

#include "Shared/ReferenceCounter.h"
#include "ProcessID.h"
#include "Shared/plist.h"
#include <sys/types.h>
#include <map>
#include <exception>

Include dependency graph for RCRegion.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ThreadNS

Classes

class  RCRegion
 provides compatability with the OPEN-R type of the same name More...
struct  RCRegion::Identifier
 contains all information needed to attach this region from a different process More...

Defines

#define POSIX_SHM   1
 If TEKKOTSU_SHM_STYLE is set to POSIX_SHM, POSIX style shared memory will be used (shm_open, shm_unlink, mmap, munmap, ...); This is the default shared memory interface, both portable and stable. By default, regular open() and unlink() will be used to implement the regions using file-backed shared memory. If you define USE_UNBACKED_SHM, RCRegion will use shm_open/shm_unlink instead. Unbacked shared memory is nice because there's no interaction with your filesystem, but isn't quite as portable. (Cygwin didn't seem to like it too much...).
#define SYSV_SHM   2
 If TEKKOTSU_SHM_STYLE is set to SYSV_SHM, SysV style shared memory will be used (shmget, shmctl, shmat, shmdt, ...) SysV style seems to stick around following a program crash, and can't be unlinked pre-emptively while still in use. Since it appears many systems also limit the number of shared memory regions (via a sysctl configuration), leaking regions following repeated crashes during development gets annoying.
#define NO_SHM   3
 If TEKKOTSU_SHM_STYLE is set to NO_SHM, all shared memory operations become straight new/delete's; this restricts the program to using threads in a single process.
#define TEKKOTSU_SHM_STYLE   POSIX_SHM
 Can be set to one of POSIX_SHM, SYSV_SHM, or NO_SHM.


Define Documentation

#define NO_SHM   3

If TEKKOTSU_SHM_STYLE is set to NO_SHM, all shared memory operations become straight new/delete's; this restricts the program to using threads in a single process.

Definition at line 45 of file RCRegion.h.

#define POSIX_SHM   1

If TEKKOTSU_SHM_STYLE is set to POSIX_SHM, POSIX style shared memory will be used (shm_open, shm_unlink, mmap, munmap, ...); This is the default shared memory interface, both portable and stable. By default, regular open() and unlink() will be used to implement the regions using file-backed shared memory. If you define USE_UNBACKED_SHM, RCRegion will use shm_open/shm_unlink instead. Unbacked shared memory is nice because there's no interaction with your filesystem, but isn't quite as portable. (Cygwin didn't seem to like it too much...).

Definition at line 39 of file RCRegion.h.

#define SYSV_SHM   2

If TEKKOTSU_SHM_STYLE is set to SYSV_SHM, SysV style shared memory will be used (shmget, shmctl, shmat, shmdt, ...) SysV style seems to stick around following a program crash, and can't be unlinked pre-emptively while still in use. Since it appears many systems also limit the number of shared memory regions (via a sysctl configuration), leaking regions following repeated crashes during development gets annoying.

Definition at line 42 of file RCRegion.h.

#define TEKKOTSU_SHM_STYLE   POSIX_SHM

Can be set to one of POSIX_SHM, SYSV_SHM, or NO_SHM.

Definition at line 48 of file RCRegion.h.


Tekkotsu v4.0
Generated Thu Nov 22 00:56:57 2007 by Doxygen 1.5.4