IPC server: NetBSD sync, general improvements

- switch to the NetBSD identifier system; it is not only better, but
  also required for porting NetBSD ipcs(1) and ipcrm(1); however, it
  requires that slots not be moved, and that results in some changes;
- synchronize some other things with NetBSD: where keys are kept, as
  well as various non-permission mode flags;
- fix semctl(2) vararg retrieval and message field type;
- use SUSPEND instead of weird reply exceptions in the call table;
- fix several memory leaks and at least one missing permission check;
- improve the atomicity of semop(2) by a small amount, even though
  its atomicity is still broken at a fundamental level;
- use the new cheaper way to retrieve the current time;
- resolve all level-5 LLVM warnings.

Change-Id: I0c47aacde478b23bb77d628384aeab855a22fdbf
This commit is contained in:
David van Moolenbroek
2015-11-24 23:01:22 +00:00
committed by Lionel Sambuc
parent 58c1923c9f
commit 4d272e5a97
10 changed files with 353 additions and 285 deletions

View File

@@ -187,11 +187,13 @@ struct sem_sysctl_info {
/* actual size of an undo structure */
#define SEMUSZ (sizeof(struct sem_undo)+sizeof(struct sem_undo_entry)*SEMUME)
#ifndef __minix
/*
* Structures allocated in machdep.c
*/
extern struct seminfo seminfo;
extern struct semid_ds *sema; /* semaphore id pool */
#endif /* !__minix */
/*
* Parameters to the semconfig system call