version 1.1.1.1.2.1, 2008/09/30 20:19:48
|
version 1.1.1.1.2.3, 2008/10/13 18:22:01
|
Line 126 inline void *ipc_attachSession(tagSess * __restrict s,
|
Line 126 inline void *ipc_attachSession(tagSess * __restrict s,
|
inline void ipc_detachSession(tagSess * __restrict s); |
inline void ipc_detachSession(tagSess * __restrict s); |
|
|
/* |
/* |
|
* isAttached() Check for mapped/(attached) shared memory |
|
* @s = Session item |
|
* return: -1 null session item, 0 not attached, 1 attached memory |
|
*/ |
|
inline int isAttached(tagSess * __restrict s); |
|
|
|
|
|
/* |
* map_notSemaphore() MMAP negative block if semaphore isn`t signaled |
* map_notSemaphore() MMAP negative block if semaphore isn`t signaled |
* @s = Session item |
* @s = Session item |
*/ |
*/ |
Line 173 inline int ipc_addSemaphore(tagSess * __restrict s);
|
Line 181 inline int ipc_addSemaphore(tagSess * __restrict s);
|
*/ |
*/ |
inline int ipc_decSemaphore(tagSess * __restrict s); |
inline int ipc_decSemaphore(tagSess * __restrict s); |
|
|
|
|
// --------------------------------------------------------- |
// --------------------------------------------------------- |
// |
// |
// Lazy macros for lazy programmers :-) by Michael Pounov; Optimizing work with sessions! |
// Lazy macros for lazy programmers :-) by Michael Pounov; Optimizing work with sessions! |
// |
// |
|
|
#define DESTROY_SESSION(fname, s) do { \ |
#define DESTROY_SESSION(fname, s) do { \ |
switch ((s)->type) { \ | switch (((*s))->type) { \ |
case SHARED_IPC: \ |
case SHARED_IPC: \ |
ipc_destroySession((fname), (s)); \ |
ipc_destroySession((fname), (s)); \ |
break; \ |
break; \ |
Line 189 inline int ipc_decSemaphore(tagSess * __restrict s);
|
Line 198 inline int ipc_decSemaphore(tagSess * __restrict s);
|
} \ |
} \ |
} while(0) |
} while(0) |
|
|
#define ATTACH_MEMORY(s, shared) do { \ | #define ATTACH_MEMORY(s) do { \ |
switch ((s)->type) { \ |
switch ((s)->type) { \ |
case SHARED_IPC: \ |
case SHARED_IPC: \ |
(shared) = ipc_attachSession((s), 0); \ | ipc_attachSession((s), 0); \ |
break; \ |
break; \ |
case SHARED_MAP: \ |
case SHARED_MAP: \ |
(shared) = map_attachSession((s), 0); \ | map_attachSession((s), 0); \ |
break; \ |
break; \ |
} \ |
} \ |
} while(0) |
} while(0) |