summaryrefslogtreecommitdiffstats
path: root/sys-utils/ipcutils.h
diff options
context:
space:
mode:
authorSami Kerola2012-11-11 22:12:20 +0100
committerKarel Zak2012-11-23 14:58:22 +0100
commitb5504a3d4b318ef30600749b490c06b89f99349e (patch)
tree721695cdc4a6445cff4f7f27c350d42f71483004 /sys-utils/ipcutils.h
parentipcs: clean up do_sem(), and add ipc_sem_get_info() (diff)
downloadkernel-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.h7
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;
};