OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uC-libc/] [include/] [linux/] [ipc.h] - Blame information for rev 1778

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
#ifndef _LINUX_IPC_H
2
#define _LINUX_IPC_H
3
#include <linux/types.h>
4
 
5
typedef int key_t;              /* should go in <types.h> type for IPC key */
6
#define IPC_PRIVATE ((key_t) 0)  
7
 
8
struct ipc_perm
9
{
10
  key_t  key;
11
  ushort uid;   /* owner euid and egid */
12
  ushort gid;
13
  ushort cuid;  /* creator euid and egid */
14
  ushort cgid;
15
  ushort mode;  /* access modes see mode flags below */
16
  ushort seq;   /* sequence number */
17
};
18
 
19
 
20
/* resource get request flags */
21
#define IPC_CREAT  00001000   /* create if key is nonexistent */
22
#define IPC_EXCL   00002000   /* fail if key exists */
23
#define IPC_NOWAIT 00004000   /* return error on wait */
24
 
25
 
26
/*
27
 * Control commands used with semctl, msgctl and shmctl
28
 * see also specific commands in sem.h, msg.h and shm.h
29
 */
30
#define IPC_RMID 0     /* remove resource */
31
#define IPC_SET  1     /* set ipc_perm options */
32
#define IPC_STAT 2     /* get ipc_perm options */
33
#define IPC_INFO 3     /* see ipcs */
34
 
35
#ifdef __KERNEL__
36
 
37
/* special shmsegs[id], msgque[id] or semary[id]  values */
38
#define IPC_UNUSED      ((void *) -1)
39
#define IPC_NOID        ((void *) -2)           /* being allocated/destroyed */
40
 
41
/*
42
 * These are used to wrap system calls. See ipc/util.c.
43
 */
44
struct ipc_kludge {
45
    struct msgbuf *msgp;
46
    long msgtyp;
47
};
48
 
49
#define SEMOP           1
50
#define SEMGET          2
51
#define SEMCTL          3
52
#define MSGSND          11
53
#define MSGRCV          12
54
#define MSGGET          13
55
#define MSGCTL          14
56
#define SHMAT           21
57
#define SHMDT           22
58
#define SHMGET          23
59
#define SHMCTL          24
60
 
61
#define IPCCALL(version,op)     ((version)<<16 | (op))
62
 
63
#endif /* __KERNEL__ */
64
 
65
#endif /* _LINUX_IPC_H */
66
 
67
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.