summaryrefslogtreecommitdiff
path: root/usr.bin/kdump/mksubr
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2013-06-17 19:11:55 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2013-06-17 19:11:55 +0000
commit407e1f7584c8aaaf7209611a864ba04253685690 (patch)
tree0b2da6aa5f947080312c01f7e306c4f4bffe39b8 /usr.bin/kdump/mksubr
parent22db4b2e9c63b9f500b2d0f99d94107b5a600444 (diff)
Add support for the _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME options,
including CLOCK_{PROCESS,THREAD}_CPUTIME_ID constants and {clock,pthread}_getcpuclockid() functions. Worked out at t2k13 with help from tedu@ and matthew@ and testing by aja@ ok matthew@
Diffstat (limited to 'usr.bin/kdump/mksubr')
-rw-r--r--usr.bin/kdump/mksubr12
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/kdump/mksubr b/usr.bin/kdump/mksubr
index 1682fd9e99a..d0b048bedc3 100644
--- a/usr.bin/kdump/mksubr
+++ b/usr.bin/kdump/mksubr
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: mksubr,v 1.14 2012/12/25 09:35:51 guenther Exp $
+# $OpenBSD: mksubr,v 1.15 2013/06/17 19:11:54 guenther Exp $
#
# Copyright (c) 2006 David Kirchner <dpk@dpk.net>
#
@@ -429,6 +429,14 @@ flagsandmodename (int flags, int mode) {
}
}
+void
+clockname (int clockid)
+{
+ clocktypename(__CLOCK_TYPE(clockid));
+ if (__CLOCK_PTID(clockid) != 0)
+ printf("(%d)", __CLOCK_PTID(clockid));
+}
+
/*
* MANUAL
*
@@ -476,7 +484,7 @@ auto_switch_type "shutdownhowname" "SHUT_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h
#auto_switch_type "prioname" "PRIO_[A-Z]+[[:space:]]+[0-9]" "sys/resource.h"
auto_switch_type "madvisebehavname" "_?MADV_[A-Z]+[[:space:]]+[0-9]+" "sys/mman.h"
auto_switch_type "msyncflagsname" "MS_[A-Z]+[[:space:]]+0x[0-9]+" "sys/mman.h"
-auto_switch_type "clockname" "CLOCK_[A-Z]+[[:space:]]+[0-9]+" "sys/_time.h"
+auto_switch_type "clocktypename" "CLOCK_[_A-Z]+[[:space:]]+[0-9]+" "sys/_time.h"
#auto_switch_type "schedpolicyname" "SCHED_[A-Z]+[[:space:]]+[0-9]+" "sched.h"
#auto_switch_type "kldunloadfflagsname" "LINKER_UNLOAD_[A-Z]+[[:space:]]+[0-9]+" "sys/linker.h"
#auto_switch_type "extattrctlname" "EXTATTR_NAMESPACE_[A-Z]+[[:space:]]+0x[0-9]+" "sys/extattr.h"