summaryrefslogtreecommitdiffstats
path: root/sys/sys/user.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2013-05-03 21:11:57 +0000
committerjhb <jhb@FreeBSD.org>2013-05-03 21:11:57 +0000
commit679fa5ed4e91b1d9e2002d8da43d9c31056fe7a4 (patch)
tree4b4ec8c6d14c8986e2139b96edf75a870d996980 /sys/sys/user.h
parent66bb8e0f75e5284e0b64916ea8295efb5ca1fff6 (diff)
downloadFreeBSD-src-679fa5ed4e91b1d9e2002d8da43d9c31056fe7a4.zip
FreeBSD-src-679fa5ed4e91b1d9e2002d8da43d9c31056fe7a4.tar.gz
Similar to 233760 and 236717, export some more useful info about the
kernel-based POSIX semaphore descriptors to userland via procstat(1) and fstat(1): - Change sem file descriptors to track the pathname they are associated with and add a ksem_info() method to copy the path out to a caller-supplied buffer. - Use the fo_stat() method of shared memory objects and ksem_info() to export the path, mode, and value of a semaphore via struct kinfo_file. - Add a struct semstat to the libprocstat(3) interface along with a procstat_get_sem_info() to export the mode and value of a semaphore. - Teach fstat about semaphores and to display their path, mode, and value. MFC after: 2 weeks
Diffstat (limited to 'sys/sys/user.h')
-rw-r--r--sys/sys/user.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sys/user.h b/sys/sys/user.h
index 2f6514b..aa81dc9 100644
--- a/sys/sys/user.h
+++ b/sys/sys/user.h
@@ -365,6 +365,10 @@ struct kinfo_file {
uint32_t kf_file_pad1;
} kf_file;
struct {
+ uint32_t kf_sem_value;
+ uint16_t kf_sem_mode;
+ } kf_sem;
+ struct {
uint64_t kf_pipe_addr;
uint64_t kf_pipe_peer;
uint32_t kf_pipe_buffer_cnt;
OpenPOWER on IntegriCloud