]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/libc_backends/lib/sem_noop/sem_noop.c
update
[l4.git] / l4 / pkg / libc_backends / lib / sem_noop / sem_noop.c
1 /*
2  * (c) 2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
3  *     economic rights: Technische Universität Dresden (Germany)
4  * This file is part of TUD:OS and distributed under the terms of the
5  * GNU Lesser General Public License 2.1.
6  * Please see the COPYING-LGPL-2.1 file for details.
7  */
8
9 #include <sys/types.h>
10 #include <sys/ipc.h>
11 #include <sys/sem.h>
12
13 #include <stdio.h>
14 #include <errno.h>
15
16 union semun
17 {
18      int val;
19      struct semid_ds *buf;
20      unsigned short  *array;
21      struct seminfo  *info;
22 };
23
24 key_t ftok(const char *pathname, int proj_id)
25 {
26   printf("%s(%s, %d)\n", __func__, pathname, proj_id);
27   errno = ENOSYS;
28   return -1;
29 }
30
31 int semget(key_t key, int nsems, int semflg)
32 {
33   printf("%s(%d, %d, %d)\n", __func__, key, nsems, semflg);
34   errno = ENOSYS;
35   return -1;
36 }
37
38 int semctl(int semid, int semnum, int cmd, ...)
39 {
40   printf("%s(%d, %d, %d)\n", __func__, semid, semnum, cmd);
41   errno = ENOSYS;
42   return -1;
43 }
44
45 int semop(int semid, struct sembuf *sops, size_t nsops)
46 {
47   printf("%s(%d, %p, %zd)\n", __func__, semid, sops, nsops);
48   errno = ENOSYS;
49   return -1;
50 }
51