Add a define to reduce the source size of the various callers of semctl1()
This commit is contained in:
parent
0d8033bf02
commit
5ff680264f
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sem.h,v 1.22 2006/07/23 22:06:14 ad Exp $ */
|
||||
/* $NetBSD: sem.h,v 1.23 2007/06/17 10:21:25 dsl Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -228,6 +228,10 @@ void seminit(void);
|
||||
void semexit(struct proc *, void *);
|
||||
|
||||
int semctl1(struct lwp *, int, int, int, void *, register_t *);
|
||||
#define get_semctl_arg(cmd, sembuf, arg) \
|
||||
((cmd) == IPC_SET || (cmd) == IPC_STAT ? (void *)sembuf \
|
||||
: (cmd) == GETALL || (cmd) == SETVAL || (cmd) == SETALL ? (void *)arg \
|
||||
: NULL)
|
||||
#endif /* !_KERNEL */
|
||||
|
||||
#endif /* !_SYS_SEM_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user