2 meinOS - A unix-like x86 microkernel operating system
3 Copyright (C) 2008 Janosch Gräf <janosch.graef@gmx.net>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #include <sys/types.h>
26 typedef struct ipc_sem_S ipc_sem_t
;
58 id_t
ipc_sem_get(key_t key
);
59 int ipc_sem_create(key_t key
,size_t nsems
,mode_t mode
,time_t time
);
60 int ipc_sem_op(id_t id
,ipc_sem_op_t
*ops
,size_t nops
,time_t time
);
61 int ipc_sem_getval(id_t id
,size_t num
);
62 int ipc_sem_setval(id_t id
,size_t num
,int val
,time_t time
);
63 pid_t
ipc_sem_getpid(id_t id
,size_t num
);
64 size_t ipc_sem_getcnt(id_t id
,size_t num
,int type
);
65 int ipc_sem_getall(id_t id
,short *buf
);
66 int ipc_sem_setall(id_t id
,short *buf
,time_t time
);
67 int ipc_sem_stat(id_t id
,uid_t
*uid
,gid_t
*gid
,uid_t
*cuid
,gid_t
*cgid
,mode_t
*mode
,size_t *nsems
,time_t *otime
,time_t *ctime
);
68 int ipc_sem_set(id_t id
,uid_t uid
,gid_t gid
,mode_t mode
,time_t time
);
69 int ipc_sem_destroy(id_t id
);