VSF Documented
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
source
shell
sys
linux
include
sys
ipc.h
Go to the documentation of this file.
1
#ifndef __VSF_LINUX_SYS_IPC_H__
2
#define __VSF_LINUX_SYS_IPC_H__
3
4
#include "
shell/sys/linux/vsf_linux_cfg.h
"
5
6
#if VSF_LINUX_CFG_RELATIVE_PATH == ENABLED
7
# include "../sys/types.h"
8
#else
9
# include <
sys/types.h
>
10
#endif
11
12
#ifdef __cplusplus
13
extern
"C"
{
14
#endif
15
16
#define IPC_PRIVATE ((key_t)0)
17
enum
{
18
IPC_CREAT
= 1 << 12,
19
IPC_EXCL
= 2 << 12,
20
IPC_NOWAIT
= 4 << 12,
21
};
22
enum
{
23
IPC_RMID
,
24
IPC_SET
,
25
IPC_STAT
,
26
IPC_INFO
,
27
};
28
29
struct
ipc_perm
{
30
key_t
key
;
31
uid_t
uid
;
32
gid_t
gid
;
33
uid_t
cuid
;
34
gid_t
cgid
;
35
unsigned
short
mode
;
36
unsigned
short
seq
;
37
};
38
39
#if VSF_LINUX_CFG_WRAPPER == ENABLED
40
#define ftok VSF_LINUX_WRAPPER(ftok)
41
#endif
42
43
#if VSF_LINUX_APPLET_USE_SYS_IPC == ENABLED
44
typedef
struct
vsf_linux_sys_ipc_vplt_t
{
45
vsf_vplt_info_t
info
;
46
}
vsf_linux_sys_ipc_vplt_t
;
47
# ifndef __VSF_APPLET__
48
extern
__VSF_VPLT_DECORATOR__
vsf_linux_sys_ipc_vplt_t
vsf_linux_sys_ipc_vplt
;
49
# endif
50
#endif
51
52
#if defined(__VSF_APPLET__) && (defined(__VSF_APPLET_LIB__) || defined(__VSF_APPLET_LINUX_SYS_IPC_LIB__))\
53
&& VSF_APPLET_CFG_ABI_PATCH != ENABLED && VSF_LINUX_APPLET_USE_SYS_IPC == ENABLED
54
55
#ifndef VSF_LINUX_APPLET_SYS_IPC_VPLT
56
# if VSF_LINUX_USE_APPLET == ENABLED
57
# define VSF_LINUX_APPLET_SYS_IPC_VPLT \
58
((vsf_linux_sys_ipc_vplt_t *)(VSF_LINUX_APPLET_VPLT->sys_ipc_vplt))
59
# else
60
# define VSF_LINUX_APPLET_SYS_IPC_VPLT \
61
((vsf_linux_sys_ipc_vplt_t *)vsf_vplt((void *)0))
62
# endif
63
#endif
64
65
#define VSF_LINUX_APPLET_SYS_IPC_ENTRY(__NAME) \
66
VSF_APPLET_VPLT_ENTRY_FUNC_ENTRY(VSF_LINUX_APPLET_SYS_IPC_VPLT, __NAME)
67
#define VSF_LINUX_APPLET_SYS_IPC_IMP(...) \
68
VSF_APPLET_VPLT_ENTRY_FUNC_IMP(VSF_LINUX_APPLET_SYS_IPC_VPLT, __VA_ARGS__)
69
70
#else
// __VSF_APPLET__ && VSF_LINUX_APPLET_USE_SYS_IPC
71
72
key_t
ftok
(
const
char
*pathname,
int
id
);
73
74
#endif
// __VSF_APPLET__ && VSF_LINUX_APPLET_USE_SYS_IPC
75
76
#ifdef __cplusplus
77
}
78
#endif
79
80
#endif
ftok
#define ftok
Definition
ipc.h:40
vsf_linux_sys_ipc_vplt
__VSF_VPLT_DECORATOR__ vsf_linux_sys_ipc_vplt_t vsf_linux_sys_ipc_vplt
IPC_NOWAIT
@ IPC_NOWAIT
Definition
ipc.h:20
IPC_CREAT
@ IPC_CREAT
Definition
ipc.h:18
IPC_EXCL
@ IPC_EXCL
Definition
ipc.h:19
IPC_RMID
@ IPC_RMID
Definition
ipc.h:23
IPC_SET
@ IPC_SET
Definition
ipc.h:24
IPC_STAT
@ IPC_STAT
Definition
ipc.h:25
IPC_INFO
@ IPC_INFO
Definition
ipc.h:26
types.h
uid_t
unsigned int uid_t
Definition
types.h:90
gid_t
unsigned int gid_t
Definition
types.h:91
key_t
int key_t
Definition
types.h:84
ipc_perm
Definition
ipc.h:29
ipc_perm::cgid
gid_t cgid
Definition
ipc.h:34
ipc_perm::key
key_t key
Definition
ipc.h:30
ipc_perm::mode
unsigned short mode
Definition
ipc.h:35
ipc_perm::seq
unsigned short seq
Definition
ipc.h:36
ipc_perm::cuid
uid_t cuid
Definition
ipc.h:33
ipc_perm::gid
gid_t gid
Definition
ipc.h:32
ipc_perm::uid
uid_t uid
Definition
ipc.h:31
vsf_linux_sys_ipc_vplt_t
Definition
ipc.h:44
vsf_linux_sys_ipc_vplt_t::info
vsf_vplt_info_t info
Definition
ipc.h:45
vsf_vplt_info_t
Definition
vsf_cfg.h:95
__VSF_VPLT_DECORATOR__
#define __VSF_VPLT_DECORATOR__
Definition
vsf_cfg.h:93
vsf_linux_cfg.h
Generated by
1.9.8