From 407e1f7584c8aaaf7209611a864ba04253685690 Mon Sep 17 00:00:00 2001 From: Philip Guenther Date: Mon, 17 Jun 2013 19:11:55 +0000 Subject: 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@ --- usr.bin/kdump/mksubr | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'usr.bin/kdump/mksubr') 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 # @@ -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" -- cgit v1.2.3