projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
4f7b988
)
mqueues: Add support for _SC_MQ_PRIO_MAX in sysconf(3).
author
Stathis Kamperis <beket@dragonflybsd.org>
Thu, 5 Nov 2009 14:19:59 +0000 (16:19 +0200)
committer
Stathis Kamperis <beket@dragonflybsd.org>
Thu, 5 Nov 2009 18:07:25 +0000 (20:07 +0200)
lib/libc/gen/sysconf.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/libc/gen/sysconf.c
b/lib/libc/gen/sysconf.c
index
244aed9
..
aa73f45
100644
(file)
--- a/
lib/libc/gen/sysconf.c
+++ b/
lib/libc/gen/sysconf.c
@@
-381,10
+381,13
@@
yesno:
#else
return (_POSIX_MONOTONIC_CLOCK);
#endif
-#if _POSIX_MESSAGE_PASSING > -1
case _SC_MQ_PRIO_MAX:
- return (MQ_PRIO_MAX);
-#endif
+ len = sizeof(lvalue);
+ if (sysctlbyname("kern.mqueue.mq_prio_max", &lvalue, &len,
+ NULL, 0) == -1)
+ return (-1);
+ return (lvalue);
+
case _SC_READER_WRITER_LOCKS:
return (_POSIX_READER_WRITER_LOCKS);
case _SC_REGEXP: