diff options
author | Sami Kerola | 2012-11-11 22:12:20 +0100 |
---|---|---|
committer | Karel Zak | 2012-11-23 14:58:22 +0100 |
commit | b5504a3d4b318ef30600749b490c06b89f99349e (patch) | |
tree | 721695cdc4a6445cff4f7f27c350d42f71483004 /sys-utils/ipcutils.h | |
parent | ipcs: clean up do_sem(), and add ipc_sem_get_info() (diff) | |
download | kernel-qcow2-util-linux-b5504a3d4b318ef30600749b490c06b89f99349e.tar.gz kernel-qcow2-util-linux-b5504a3d4b318ef30600749b490c06b89f99349e.tar.xz kernel-qcow2-util-linux-b5504a3d4b318ef30600749b490c06b89f99349e.zip |
ipcs: make individual semaphore id printing to use /proc
And reindent the print_shm() function.
[kzak@redhat.com: move semctl(GET*...) calls to ipcutils.c]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/ipcutils.h')
-rw-r--r-- | sys-utils/ipcutils.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys-utils/ipcutils.h b/sys-utils/ipcutils.h index 3ab5da0ca..f50e03c61 100644 --- a/sys-utils/ipcutils.h +++ b/sys-utils/ipcutils.h @@ -134,6 +134,12 @@ extern void ipc_shm_free_info(struct shm_data *shmds); /* See 'struct sem_array' in kernel sources */ +struct sem_elem { + int semval; + int ncount; /* processes waiting on increase semval */ + int zcount; /* processes waiting on semval set to zero */ + pid_t pid; /* process last executed semop(2) call */ +}; struct sem_data { struct ipc_stat sem_perm; @@ -141,6 +147,7 @@ struct sem_data { time_t sem_otime; uint64_t sem_nsems; + struct sem_elem *elements; struct sem_data *next; }; |