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:
@@ -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
|
||||
|
||||
@@ -215,12 +215,12 @@ struct shm_info
|
||||
unsigned long int swap_successes;
|
||||
};
|
||||
|
||||
#define SHMMNI 4096
|
||||
#define SHMMNI 1024
|
||||
#define SHMSEG 32 /* max shared segs per process */
|
||||
|
||||
/* shm_mode upper byte flags */
|
||||
#define SHM_DEST 01000 /* segment will be destroyed on last detach */
|
||||
#define SHM_LOCKED 02000 /* segment will not be swapped */
|
||||
/* Public shm_perm.mode flags, synchronized with NetBSD kernel values above */
|
||||
#define SHM_DEST 0x0400 /* destroy on last detach (SHMSEG_REMOVED) */
|
||||
#define SHM_LOCKED 0x4000 /* pages will not be swapped (SHMSEG_WIRED) */
|
||||
|
||||
#endif /* defined(__minix) */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user