mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Bring semop() closer the the opengroup standards.
PR: 47471 Submitted by: Craig Rodrigues <rodrigc@attbi.com>
This commit is contained in:
parent
77c1940282
commit
3beb32709d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=109829
|
@ -38,7 +38,7 @@
|
|||
.In sys/ipc.h
|
||||
.In sys/sem.h
|
||||
.Ft int
|
||||
.Fn semop "int semid" "struct sembuf *array" "unsigned nops"
|
||||
.Fn semop "int semid" "struct sembuf *array" "size_t nops"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn semop
|
||||
|
|
|
@ -352,7 +352,7 @@
|
|||
union semun *arg); }
|
||||
221 MNOSTD BSD { int semget(key_t key, int nsems, int semflg); }
|
||||
222 MNOSTD BSD { int semop(int semid, struct sembuf *sops, \
|
||||
u_int nsops); }
|
||||
size_t nsops); }
|
||||
223 UNIMPL NOHIDE semconfig
|
||||
224 MNOSTD BSD { int msgctl(int msqid, int cmd, \
|
||||
struct msqid_ds *buf); }
|
||||
|
|
|
@ -858,7 +858,7 @@ semget(td, uap)
|
|||
struct semop_args {
|
||||
int semid;
|
||||
struct sembuf *sops;
|
||||
u_int nsops;
|
||||
size_t nsops;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -871,14 +871,15 @@ semop(td, uap)
|
|||
struct semop_args *uap;
|
||||
{
|
||||
int semid = uap->semid;
|
||||
u_int nsops = uap->nsops;
|
||||
size_t nsops = uap->nsops;
|
||||
struct sembuf *sops;
|
||||
struct semid_ds *semaptr;
|
||||
struct sembuf *sopptr = 0;
|
||||
struct sem *semptr = 0;
|
||||
struct sem_undo *suptr;
|
||||
struct mtx *sema_mtxp;
|
||||
int i, j, error;
|
||||
size_t i, j;
|
||||
int error;
|
||||
int do_wakeup, do_undos;
|
||||
|
||||
DPRINTF(("call to semop(%d, 0x%x, %u)\n", semid, sops, nsops));
|
||||
|
|
|
@ -96,12 +96,23 @@ void semexit(struct proc *p);
|
|||
|
||||
#ifndef _KERNEL
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/_types.h>
|
||||
|
||||
#ifndef _SIZE_T_DECLARED
|
||||
typedef __size_t size_t;
|
||||
#define _SIZE_T_DECLARED
|
||||
#endif
|
||||
|
||||
#ifndef _PID_T_DECLARED
|
||||
typedef __pid_t pid_t;
|
||||
#define _PID_T_DECLARED
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
int semsys(int, ...);
|
||||
int semctl(int, int, int, ...);
|
||||
int semget(key_t, int, int);
|
||||
int semop(int, struct sembuf *,unsigned);
|
||||
int semop(int, struct sembuf *,size_t);
|
||||
__END_DECLS
|
||||
#endif /* !_KERNEL */
|
||||
|
||||
|
|
Loading…
Reference in a new issue