xref: /dflybsd-src/lib/libc/gen/sysvipc_semop.c (revision 08f3ae3e21d368468aa4fb2d779eda101befe182)
1 /*
2  * $DragonFly: src/lib/libc/gen/semop.c,v 1.2 2005/11/13 00:07:42 swildner Exp $
3  * $DragonFly: src/lib/libc/gen/msgget.c,v 1.2 2013/09/24 21:37:00 Lrisa Grigore <larisagrigore@gmail.com> Exp $
4  */
5 
6 #include <sys/types.h>
7 #include <sys/ipc.h>
8 #include <sys/sem.h>
9 
10 #include "sysvipc_sem.h"
11 
12 extern char use_userland_impl;
13 extern int __sys_semop(int, struct sembuf *, unsigned);
14 
15 int semop(int semid, struct sembuf *sops, unsigned nsops)
16 {
17 	if (use_userland_impl) {
18 		return (sysvipc_semop(semid, sops, nsops));
19 	}
20 	return (__sys_semop(semid, sops, nsops));
21 }
22