Move the thread stack attribute functions to a separate page. In addition, document pthread_attr_getstack() and pthread_attr_setstack(). Try to also document these a little better (in particular, note some items in the long list of caveats and questions related to application-controlled thread stack).diff -r1.1479 -r1.1480 src/distrib/sets/lists/comp/mi
(jruoho)
--- src/distrib/sets/lists/comp/mi 2010/07/06 21:36:34 1.1479
+++ src/distrib/sets/lists/comp/mi 2010/07/07 11:04:52 1.1480
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: mi,v 1.1479 2010/07/06 21:36:34 jruoho Exp $ | 1 | # $NetBSD: mi,v 1.1480 2010/07/07 11:04:52 jruoho Exp $ | |
2 | # | 2 | # | |
3 | # Note: don't delete entries from here - mark them as "obsolete" instead. | 3 | # Note: don't delete entries from here - mark them as "obsolete" instead. | |
4 | # | 4 | # | |
5 | ./etc/mtree/set.comp comp-sys-root | 5 | ./etc/mtree/set.comp comp-sys-root | |
6 | ./usr/bin/addr2line comp-debug-bin binutils | 6 | ./usr/bin/addr2line comp-debug-bin binutils | |
7 | ./usr/bin/ar comp-util-bin binutils | 7 | ./usr/bin/ar comp-util-bin binutils | |
8 | ./usr/bin/as comp-util-bin binutils | 8 | ./usr/bin/as comp-util-bin binutils | |
9 | ./usr/bin/asa comp-fortran-bin | 9 | ./usr/bin/asa comp-fortran-bin | |
10 | ./usr/bin/atf-compile comp-obsolete obsolete | 10 | ./usr/bin/atf-compile comp-obsolete obsolete | |
11 | ./usr/bin/c++ comp-cxx-bin gcccmds | 11 | ./usr/bin/c++ comp-cxx-bin gcccmds | |
12 | ./usr/bin/c++filt comp-cxx-bin binutils | 12 | ./usr/bin/c++filt comp-cxx-bin binutils | |
13 | ./usr/bin/c89 comp-c-bin | 13 | ./usr/bin/c89 comp-c-bin | |
14 | ./usr/bin/c99 comp-c-bin | 14 | ./usr/bin/c99 comp-c-bin | |
@@ -7561,37 +7561,39 @@ | @@ -7561,37 +7561,39 @@ | |||
7561 | ./usr/share/man/cat3/psignal.0 comp-c-catman .cat | 7561 | ./usr/share/man/cat3/psignal.0 comp-c-catman .cat | |
7562 | ./usr/share/man/cat3/pthread.0 comp-c-catman .cat | 7562 | ./usr/share/man/cat3/pthread.0 comp-c-catman .cat | |
7563 | ./usr/share/man/cat3/pthread_atfork.0 comp-c-catman .cat | 7563 | ./usr/share/man/cat3/pthread_atfork.0 comp-c-catman .cat | |
7564 | ./usr/share/man/cat3/pthread_attr.0 comp-c-catman .cat | 7564 | ./usr/share/man/cat3/pthread_attr.0 comp-c-catman .cat | |
7565 | ./usr/share/man/cat3/pthread_attr_destroy.0 comp-c-catman .cat | 7565 | ./usr/share/man/cat3/pthread_attr_destroy.0 comp-c-catman .cat | |
7566 | ./usr/share/man/cat3/pthread_attr_get_np.0 comp-c-catman .cat | 7566 | ./usr/share/man/cat3/pthread_attr_get_np.0 comp-c-catman .cat | |
7567 | ./usr/share/man/cat3/pthread_attr_getdetachstate.0 comp-c-catman .cat | 7567 | ./usr/share/man/cat3/pthread_attr_getdetachstate.0 comp-c-catman .cat | |
7568 | ./usr/share/man/cat3/pthread_attr_getguardsize.0 comp-c-catman .cat | 7568 | ./usr/share/man/cat3/pthread_attr_getguardsize.0 comp-c-catman .cat | |
7569 | ./usr/share/man/cat3/pthread_attr_getinheritsched.0 comp-c-catman .cat | 7569 | ./usr/share/man/cat3/pthread_attr_getinheritsched.0 comp-c-catman .cat | |
7570 | ./usr/share/man/cat3/pthread_attr_getname_np.0 comp-c-catman .cat | 7570 | ./usr/share/man/cat3/pthread_attr_getname_np.0 comp-c-catman .cat | |
7571 | ./usr/share/man/cat3/pthread_attr_getschedparam.0 comp-c-catman .cat | 7571 | ./usr/share/man/cat3/pthread_attr_getschedparam.0 comp-c-catman .cat | |
7572 | ./usr/share/man/cat3/pthread_attr_getschedpolicy.0 comp-c-catman .cat | 7572 | ./usr/share/man/cat3/pthread_attr_getschedpolicy.0 comp-c-catman .cat | |
7573 | ./usr/share/man/cat3/pthread_attr_getscope.0 comp-c-catman .cat | 7573 | ./usr/share/man/cat3/pthread_attr_getscope.0 comp-c-catman .cat | |
7574 | ./usr/share/man/cat3/pthread_attr_getstack.0 comp-c-catman .cat | |||
7574 | ./usr/share/man/cat3/pthread_attr_getstackaddr.0 comp-c-catman .cat | 7575 | ./usr/share/man/cat3/pthread_attr_getstackaddr.0 comp-c-catman .cat | |
7575 | ./usr/share/man/cat3/pthread_attr_getstacksize.0 comp-c-catman .cat | 7576 | ./usr/share/man/cat3/pthread_attr_getstacksize.0 comp-c-catman .cat | |
7576 | ./usr/share/man/cat3/pthread_attr_init.0 comp-c-catman .cat | 7577 | ./usr/share/man/cat3/pthread_attr_init.0 comp-c-catman .cat | |
7577 | ./usr/share/man/cat3/pthread_attr_setcreatesuspend_np.0 comp-c-catman .cat | 7578 | ./usr/share/man/cat3/pthread_attr_setcreatesuspend_np.0 comp-c-catman .cat | |
7578 | ./usr/share/man/cat3/pthread_attr_setdetachstate.0 comp-c-catman .cat | 7579 | ./usr/share/man/cat3/pthread_attr_setdetachstate.0 comp-c-catman .cat | |
7579 | ./usr/share/man/cat3/pthread_attr_setguardsize.0 comp-c-catman .cat | 7580 | ./usr/share/man/cat3/pthread_attr_setguardsize.0 comp-c-catman .cat | |
7580 | ./usr/share/man/cat3/pthread_attr_setinheritsched.0 comp-c-catman .cat | 7581 | ./usr/share/man/cat3/pthread_attr_setinheritsched.0 comp-c-catman .cat | |
7581 | ./usr/share/man/cat3/pthread_attr_setname_np.0 comp-c-catman .cat | 7582 | ./usr/share/man/cat3/pthread_attr_setname_np.0 comp-c-catman .cat | |
7582 | ./usr/share/man/cat3/pthread_attr_setschedparam.0 comp-c-catman .cat | 7583 | ./usr/share/man/cat3/pthread_attr_setschedparam.0 comp-c-catman .cat | |
7583 | ./usr/share/man/cat3/pthread_attr_setschedpolicy.0 comp-c-catman .cat | 7584 | ./usr/share/man/cat3/pthread_attr_setschedpolicy.0 comp-c-catman .cat | |
7584 | ./usr/share/man/cat3/pthread_attr_setscope.0 comp-c-catman .cat | 7585 | ./usr/share/man/cat3/pthread_attr_setscope.0 comp-c-catman .cat | |
7586 | ./usr/share/man/cat3/pthread_attr_setstack.0 comp-c-catman .cat | |||
7585 | ./usr/share/man/cat3/pthread_attr_setstackaddr.0 comp-c-catman .cat | 7587 | ./usr/share/man/cat3/pthread_attr_setstackaddr.0 comp-c-catman .cat | |
7586 | ./usr/share/man/cat3/pthread_attr_setstacksize.0 comp-c-catman .cat | 7588 | ./usr/share/man/cat3/pthread_attr_setstacksize.0 comp-c-catman .cat | |
7587 | ./usr/share/man/cat3/pthread_barierattr_destroy.0 comp-obsolete obsolete | 7589 | ./usr/share/man/cat3/pthread_barierattr_destroy.0 comp-obsolete obsolete | |
7588 | ./usr/share/man/cat3/pthread_barierattr_init.0 comp-obsolete obsolete | 7590 | ./usr/share/man/cat3/pthread_barierattr_init.0 comp-obsolete obsolete | |
7589 | ./usr/share/man/cat3/pthread_barrier_destroy.0 comp-c-catman .cat | 7591 | ./usr/share/man/cat3/pthread_barrier_destroy.0 comp-c-catman .cat | |
7590 | ./usr/share/man/cat3/pthread_barrier_init.0 comp-c-catman .cat | 7592 | ./usr/share/man/cat3/pthread_barrier_init.0 comp-c-catman .cat | |
7591 | ./usr/share/man/cat3/pthread_barrier_wait.0 comp-c-catman .cat | 7593 | ./usr/share/man/cat3/pthread_barrier_wait.0 comp-c-catman .cat | |
7592 | ./usr/share/man/cat3/pthread_barrierattr.0 comp-c-catman .cat | 7594 | ./usr/share/man/cat3/pthread_barrierattr.0 comp-c-catman .cat | |
7593 | ./usr/share/man/cat3/pthread_barrierattr_destroy.0 comp-c-catman .cat | 7595 | ./usr/share/man/cat3/pthread_barrierattr_destroy.0 comp-c-catman .cat | |
7594 | ./usr/share/man/cat3/pthread_barrierattr_init.0 comp-c-catman .cat | 7596 | ./usr/share/man/cat3/pthread_barrierattr_init.0 comp-c-catman .cat | |
7595 | ./usr/share/man/cat3/pthread_cancel.0 comp-c-catman .cat | 7597 | ./usr/share/man/cat3/pthread_cancel.0 comp-c-catman .cat | |
7596 | ./usr/share/man/cat3/pthread_cleanup_pop.0 comp-c-catman .cat | 7598 | ./usr/share/man/cat3/pthread_cleanup_pop.0 comp-c-catman .cat | |
7597 | ./usr/share/man/cat3/pthread_cleanup_push.0 comp-c-catman .cat | 7599 | ./usr/share/man/cat3/pthread_cleanup_push.0 comp-c-catman .cat | |
@@ -13399,37 +13401,39 @@ | @@ -13399,37 +13401,39 @@ | |||
13399 | ./usr/share/man/html3/psignal.html comp-c-htmlman html | 13401 | ./usr/share/man/html3/psignal.html comp-c-htmlman html | |
13400 | ./usr/share/man/html3/pthread.html comp-c-htmlman html | 13402 | ./usr/share/man/html3/pthread.html comp-c-htmlman html | |
13401 | ./usr/share/man/html3/pthread_atfork.html comp-c-htmlman html | 13403 | ./usr/share/man/html3/pthread_atfork.html comp-c-htmlman html | |
13402 | ./usr/share/man/html3/pthread_attr.html comp-c-htmlman html | 13404 | ./usr/share/man/html3/pthread_attr.html comp-c-htmlman html | |
13403 | ./usr/share/man/html3/pthread_attr_destroy.html comp-c-htmlman html | 13405 | ./usr/share/man/html3/pthread_attr_destroy.html comp-c-htmlman html | |
13404 | ./usr/share/man/html3/pthread_attr_get_np.html comp-c-htmlman html | 13406 | ./usr/share/man/html3/pthread_attr_get_np.html comp-c-htmlman html | |
13405 | ./usr/share/man/html3/pthread_attr_getdetachstate.html comp-c-htmlman html | 13407 | ./usr/share/man/html3/pthread_attr_getdetachstate.html comp-c-htmlman html | |
13406 | ./usr/share/man/html3/pthread_attr_getguardsize.html comp-c-htmlman html | 13408 | ./usr/share/man/html3/pthread_attr_getguardsize.html comp-c-htmlman html | |
13407 | ./usr/share/man/html3/pthread_attr_getinheritsched.html comp-c-htmlman html | 13409 | ./usr/share/man/html3/pthread_attr_getinheritsched.html comp-c-htmlman html | |
13408 | ./usr/share/man/html3/pthread_attr_getname_np.html comp-c-htmlman html | 13410 | ./usr/share/man/html3/pthread_attr_getname_np.html comp-c-htmlman html | |
13409 | ./usr/share/man/html3/pthread_attr_getschedparam.html comp-c-htmlman html | 13411 | ./usr/share/man/html3/pthread_attr_getschedparam.html comp-c-htmlman html | |
13410 | ./usr/share/man/html3/pthread_attr_getschedpolicy.html comp-c-htmlman html | 13412 | ./usr/share/man/html3/pthread_attr_getschedpolicy.html comp-c-htmlman html | |
13411 | ./usr/share/man/html3/pthread_attr_getscope.html comp-c-htmlman html | 13413 | ./usr/share/man/html3/pthread_attr_getscope.html comp-c-htmlman html | |
13414 | ./usr/share/man/html3/pthread_attr_getstack.html comp-c-htmlman html | |||
13412 | ./usr/share/man/html3/pthread_attr_getstackaddr.html comp-c-htmlman html | 13415 | ./usr/share/man/html3/pthread_attr_getstackaddr.html comp-c-htmlman html | |
13413 | ./usr/share/man/html3/pthread_attr_getstacksize.html comp-c-htmlman html | 13416 | ./usr/share/man/html3/pthread_attr_getstacksize.html comp-c-htmlman html | |
13414 | ./usr/share/man/html3/pthread_attr_init.html comp-c-htmlman html | 13417 | ./usr/share/man/html3/pthread_attr_init.html comp-c-htmlman html | |
13415 | ./usr/share/man/html3/pthread_attr_setcreatesuspend_np.html comp-c-htmlman html | 13418 | ./usr/share/man/html3/pthread_attr_setcreatesuspend_np.html comp-c-htmlman html | |
13416 | ./usr/share/man/html3/pthread_attr_setdetachstate.html comp-c-htmlman html | 13419 | ./usr/share/man/html3/pthread_attr_setdetachstate.html comp-c-htmlman html | |
13417 | ./usr/share/man/html3/pthread_attr_setguardsize.html comp-c-htmlman html | 13420 | ./usr/share/man/html3/pthread_attr_setguardsize.html comp-c-htmlman html | |
13418 | ./usr/share/man/html3/pthread_attr_setinheritsched.html comp-c-htmlman html | 13421 | ./usr/share/man/html3/pthread_attr_setinheritsched.html comp-c-htmlman html | |
13419 | ./usr/share/man/html3/pthread_attr_setname_np.html comp-c-htmlman html | 13422 | ./usr/share/man/html3/pthread_attr_setname_np.html comp-c-htmlman html | |
13420 | ./usr/share/man/html3/pthread_attr_setschedparam.html comp-c-htmlman html | 13423 | ./usr/share/man/html3/pthread_attr_setschedparam.html comp-c-htmlman html | |
13421 | ./usr/share/man/html3/pthread_attr_setschedpolicy.html comp-c-htmlman html | 13424 | ./usr/share/man/html3/pthread_attr_setschedpolicy.html comp-c-htmlman html | |
13422 | ./usr/share/man/html3/pthread_attr_setscope.html comp-c-htmlman html | 13425 | ./usr/share/man/html3/pthread_attr_setscope.html comp-c-htmlman html | |
13426 | ./usr/share/man/html3/pthread_attr_setstack.html comp-c-htmlman html | |||
13423 | ./usr/share/man/html3/pthread_attr_setstackaddr.html comp-c-htmlman html | 13427 | ./usr/share/man/html3/pthread_attr_setstackaddr.html comp-c-htmlman html | |
13424 | ./usr/share/man/html3/pthread_attr_setstacksize.html comp-c-htmlman html | 13428 | ./usr/share/man/html3/pthread_attr_setstacksize.html comp-c-htmlman html | |
13425 | ./usr/share/man/html3/pthread_barrier_destroy.html comp-c-htmlman html | 13429 | ./usr/share/man/html3/pthread_barrier_destroy.html comp-c-htmlman html | |
13426 | ./usr/share/man/html3/pthread_barrier_init.html comp-c-htmlman html | 13430 | ./usr/share/man/html3/pthread_barrier_init.html comp-c-htmlman html | |
13427 | ./usr/share/man/html3/pthread_barrier_wait.html comp-c-htmlman html | 13431 | ./usr/share/man/html3/pthread_barrier_wait.html comp-c-htmlman html | |
13428 | ./usr/share/man/html3/pthread_barrierattr.html comp-c-htmlman html | 13432 | ./usr/share/man/html3/pthread_barrierattr.html comp-c-htmlman html | |
13429 | ./usr/share/man/html3/pthread_barrierattr_destroy.html comp-c-htmlman html | 13433 | ./usr/share/man/html3/pthread_barrierattr_destroy.html comp-c-htmlman html | |
13430 | ./usr/share/man/html3/pthread_barrierattr_init.html comp-c-htmlman html | 13434 | ./usr/share/man/html3/pthread_barrierattr_init.html comp-c-htmlman html | |
13431 | ./usr/share/man/html3/pthread_cancel.html comp-c-htmlman html | 13435 | ./usr/share/man/html3/pthread_cancel.html comp-c-htmlman html | |
13432 | ./usr/share/man/html3/pthread_cleanup_pop.html comp-c-htmlman html | 13436 | ./usr/share/man/html3/pthread_cleanup_pop.html comp-c-htmlman html | |
13433 | ./usr/share/man/html3/pthread_cleanup_push.html comp-c-htmlman html | 13437 | ./usr/share/man/html3/pthread_cleanup_push.html comp-c-htmlman html | |
13434 | ./usr/share/man/html3/pthread_cond_broadcast.html comp-c-htmlman html | 13438 | ./usr/share/man/html3/pthread_cond_broadcast.html comp-c-htmlman html | |
13435 | ./usr/share/man/html3/pthread_cond_destroy.html comp-c-htmlman html | 13439 | ./usr/share/man/html3/pthread_cond_destroy.html comp-c-htmlman html | |
@@ -19231,37 +19235,39 @@ | @@ -19231,37 +19235,39 @@ | |||
19231 | ./usr/share/man/man3/psignal.3 comp-c-man .man | 19235 | ./usr/share/man/man3/psignal.3 comp-c-man .man | |
19232 | ./usr/share/man/man3/pthread.3 comp-c-man .man | 19236 | ./usr/share/man/man3/pthread.3 comp-c-man .man | |
19233 | ./usr/share/man/man3/pthread_atfork.3 comp-c-man .man | 19237 | ./usr/share/man/man3/pthread_atfork.3 comp-c-man .man | |
19234 | ./usr/share/man/man3/pthread_attr.3 comp-c-man .man | 19238 | ./usr/share/man/man3/pthread_attr.3 comp-c-man .man | |
19235 | ./usr/share/man/man3/pthread_attr_destroy.3 comp-c-man .man | 19239 | ./usr/share/man/man3/pthread_attr_destroy.3 comp-c-man .man | |
19236 | ./usr/share/man/man3/pthread_attr_get_np.3 comp-c-man .man | 19240 | ./usr/share/man/man3/pthread_attr_get_np.3 comp-c-man .man | |
19237 | ./usr/share/man/man3/pthread_attr_getdetachstate.3 comp-c-man .man | 19241 | ./usr/share/man/man3/pthread_attr_getdetachstate.3 comp-c-man .man | |
19238 | ./usr/share/man/man3/pthread_attr_getguardsize.3 comp-c-man .man | 19242 | ./usr/share/man/man3/pthread_attr_getguardsize.3 comp-c-man .man | |
19239 | ./usr/share/man/man3/pthread_attr_getinheritsched.3 comp-c-man .man | 19243 | ./usr/share/man/man3/pthread_attr_getinheritsched.3 comp-c-man .man | |
19240 | ./usr/share/man/man3/pthread_attr_getname_np.3 comp-c-man .man | 19244 | ./usr/share/man/man3/pthread_attr_getname_np.3 comp-c-man .man | |
19241 | ./usr/share/man/man3/pthread_attr_getschedparam.3 comp-c-man .man | 19245 | ./usr/share/man/man3/pthread_attr_getschedparam.3 comp-c-man .man | |
19242 | ./usr/share/man/man3/pthread_attr_getschedpolicy.3 comp-c-man .man | 19246 | ./usr/share/man/man3/pthread_attr_getschedpolicy.3 comp-c-man .man | |
19243 | ./usr/share/man/man3/pthread_attr_getscope.3 comp-c-man .man | 19247 | ./usr/share/man/man3/pthread_attr_getscope.3 comp-c-man .man | |
19248 | ./usr/share/man/man3/pthread_attr_getstack.3 comp-c-man .man | |||
19244 | ./usr/share/man/man3/pthread_attr_getstackaddr.3 comp-c-man .man | 19249 | ./usr/share/man/man3/pthread_attr_getstackaddr.3 comp-c-man .man | |
19245 | ./usr/share/man/man3/pthread_attr_getstacksize.3 comp-c-man .man | 19250 | ./usr/share/man/man3/pthread_attr_getstacksize.3 comp-c-man .man | |
19246 | ./usr/share/man/man3/pthread_attr_init.3 comp-c-man .man | 19251 | ./usr/share/man/man3/pthread_attr_init.3 comp-c-man .man | |
19247 | ./usr/share/man/man3/pthread_attr_setcreatesuspend_np.3 comp-c-man .man | 19252 | ./usr/share/man/man3/pthread_attr_setcreatesuspend_np.3 comp-c-man .man | |
19248 | ./usr/share/man/man3/pthread_attr_setdetachstate.3 comp-c-man .man | 19253 | ./usr/share/man/man3/pthread_attr_setdetachstate.3 comp-c-man .man | |
19249 | ./usr/share/man/man3/pthread_attr_setguardsize.3 comp-c-man .man | 19254 | ./usr/share/man/man3/pthread_attr_setguardsize.3 comp-c-man .man | |
19250 | ./usr/share/man/man3/pthread_attr_setinheritsched.3 comp-c-man .man | 19255 | ./usr/share/man/man3/pthread_attr_setinheritsched.3 comp-c-man .man | |
19251 | ./usr/share/man/man3/pthread_attr_setname_np.3 comp-c-man .man | 19256 | ./usr/share/man/man3/pthread_attr_setname_np.3 comp-c-man .man | |
19252 | ./usr/share/man/man3/pthread_attr_setschedparam.3 comp-c-man .man | 19257 | ./usr/share/man/man3/pthread_attr_setschedparam.3 comp-c-man .man | |
19253 | ./usr/share/man/man3/pthread_attr_setschedpolicy.3 comp-c-man .man | 19258 | ./usr/share/man/man3/pthread_attr_setschedpolicy.3 comp-c-man .man | |
19254 | ./usr/share/man/man3/pthread_attr_setscope.3 comp-c-man .man | 19259 | ./usr/share/man/man3/pthread_attr_setscope.3 comp-c-man .man | |
19260 | ./usr/share/man/man3/pthread_attr_setstack.3 comp-c-man .man | |||
19255 | ./usr/share/man/man3/pthread_attr_setstackaddr.3 comp-c-man .man | 19261 | ./usr/share/man/man3/pthread_attr_setstackaddr.3 comp-c-man .man | |
19256 | ./usr/share/man/man3/pthread_attr_setstacksize.3 comp-c-man .man | 19262 | ./usr/share/man/man3/pthread_attr_setstacksize.3 comp-c-man .man | |
19257 | ./usr/share/man/man3/pthread_barierattr_destroy.3 comp-obsolete obsolete | 19263 | ./usr/share/man/man3/pthread_barierattr_destroy.3 comp-obsolete obsolete | |
19258 | ./usr/share/man/man3/pthread_barierattr_init.3 comp-obsolete obsolete | 19264 | ./usr/share/man/man3/pthread_barierattr_init.3 comp-obsolete obsolete | |
19259 | ./usr/share/man/man3/pthread_barrier_destroy.3 comp-c-man .man | 19265 | ./usr/share/man/man3/pthread_barrier_destroy.3 comp-c-man .man | |
19260 | ./usr/share/man/man3/pthread_barrier_init.3 comp-c-man .man | 19266 | ./usr/share/man/man3/pthread_barrier_init.3 comp-c-man .man | |
19261 | ./usr/share/man/man3/pthread_barrier_wait.3 comp-c-man .man | 19267 | ./usr/share/man/man3/pthread_barrier_wait.3 comp-c-man .man | |
19262 | ./usr/share/man/man3/pthread_barrierattr.3 comp-c-man .man | 19268 | ./usr/share/man/man3/pthread_barrierattr.3 comp-c-man .man | |
19263 | ./usr/share/man/man3/pthread_barrierattr_destroy.3 comp-c-man .man | 19269 | ./usr/share/man/man3/pthread_barrierattr_destroy.3 comp-c-man .man | |
19264 | ./usr/share/man/man3/pthread_barrierattr_init.3 comp-c-man .man | 19270 | ./usr/share/man/man3/pthread_barrierattr_init.3 comp-c-man .man | |
19265 | ./usr/share/man/man3/pthread_cancel.3 comp-c-man .man | 19271 | ./usr/share/man/man3/pthread_cancel.3 comp-c-man .man | |
19266 | ./usr/share/man/man3/pthread_cleanup_pop.3 comp-c-man .man | 19272 | ./usr/share/man/man3/pthread_cleanup_pop.3 comp-c-man .man | |
19267 | ./usr/share/man/man3/pthread_cleanup_push.3 comp-c-man .man | 19273 | ./usr/share/man/man3/pthread_cleanup_push.3 comp-c-man .man |
--- src/lib/libpthread/Makefile 2010/07/07 08:57:36 1.60
+++ src/lib/libpthread/Makefile 2010/07/07 11:04:54 1.61
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.60 2010/07/07 08:57:36 jruoho Exp $ | 1 | # $NetBSD: Makefile,v 1.61 2010/07/07 11:04:54 jruoho Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | WARNS= 4 | 4 | WARNS= 4 | |
5 | 5 | |||
6 | .include <bsd.own.mk> | 6 | .include <bsd.own.mk> | |
7 | 7 | |||
8 | .if defined(PTHREAD_MACHINE_ARCH) && !empty(PTHREAD_MACHINE_ARCH) && \ | 8 | .if defined(PTHREAD_MACHINE_ARCH) && !empty(PTHREAD_MACHINE_ARCH) && \ | |
9 | exists(${.CURDIR}/arch/${PTHREAD_MACHINE_ARCH}) | 9 | exists(${.CURDIR}/arch/${PTHREAD_MACHINE_ARCH}) | |
10 | ARCHSUBDIR= ${PTHREAD_MACHINE_ARCH} | 10 | ARCHSUBDIR= ${PTHREAD_MACHINE_ARCH} | |
11 | .elif exists(${.CURDIR}/arch/${MACHINE_ARCH}) | 11 | .elif exists(${.CURDIR}/arch/${MACHINE_ARCH}) | |
12 | ARCHSUBDIR= ${MACHINE_ARCH} | 12 | ARCHSUBDIR= ${MACHINE_ARCH} | |
13 | .elif exists(${.CURDIR}/arch/${MACHINE_CPU}) | 13 | .elif exists(${.CURDIR}/arch/${MACHINE_CPU}) | |
14 | ARCHSUBDIR= ${MACHINE_CPU} | 14 | ARCHSUBDIR= ${MACHINE_CPU} | |
@@ -83,26 +83,27 @@ pthread_lock.po: pthread_lock.o | @@ -83,26 +83,27 @@ pthread_lock.po: pthread_lock.o | |||
83 | COPTS.pthread_mutex.c+= -fomit-frame-pointer -falign-functions=32 | 83 | COPTS.pthread_mutex.c+= -fomit-frame-pointer -falign-functions=32 | |
84 | pthread_mutex.po: pthread_mutex.o | 84 | pthread_mutex.po: pthread_mutex.o | |
85 | ${_MKTARGET_CREATE} | 85 | ${_MKTARGET_CREATE} | |
86 | cp pthread_mutex.o pthread_mutex.po | 86 | cp pthread_mutex.o pthread_mutex.po | |
87 | 87 | |||
88 | COPTS.pthread.c += -Wno-stack-protector | 88 | COPTS.pthread.c += -Wno-stack-protector | |
89 | 89 | |||
90 | MAN+= affinity.3 pthread.3 \ | 90 | MAN+= affinity.3 pthread.3 \ | |
91 | pthread_attr.3 \ | 91 | pthread_attr.3 \ | |
92 | pthread_attr_get_np.3 \ | 92 | pthread_attr_get_np.3 \ | |
93 | pthread_attr_getdetachstate.3 \ | 93 | pthread_attr_getdetachstate.3 \ | |
94 | pthread_attr_getname_np.3 \ | 94 | pthread_attr_getname_np.3 \ | |
95 | pthread_attr_getscope.3 \ | 95 | pthread_attr_getscope.3 \ | |
96 | pthread_attr_getstack.3 \ | |||
96 | pthread_attr_setcreatesuspend_np.3 \ | 97 | pthread_attr_setcreatesuspend_np.3 \ | |
97 | pthread_attr_setname_np.3 \ | 98 | pthread_attr_setname_np.3 \ | |
98 | pthread_barrier_destroy.3 pthread_barrier_init.3 \ | 99 | pthread_barrier_destroy.3 pthread_barrier_init.3 \ | |
99 | pthread_barrier_wait.3 pthread_barrierattr.3 \ | 100 | pthread_barrier_wait.3 pthread_barrierattr.3 \ | |
100 | pthread_cancel.3 pthread_cleanup_push.3 \ | 101 | pthread_cancel.3 pthread_cleanup_push.3 \ | |
101 | pthread_cond_broadcast.3 pthread_cond_destroy.3 pthread_cond_init.3 \ | 102 | pthread_cond_broadcast.3 pthread_cond_destroy.3 pthread_cond_init.3 \ | |
102 | pthread_cond_wait.3 \ | 103 | pthread_cond_wait.3 \ | |
103 | pthread_condattr.3 pthread_create.3 pthread_detach.3 pthread_equal.3 \ | 104 | pthread_condattr.3 pthread_create.3 pthread_detach.3 pthread_equal.3 \ | |
104 | pthread_exit.3 \ | 105 | pthread_exit.3 \ | |
105 | pthread_getname_np.3 \ | 106 | pthread_getname_np.3 \ | |
106 | pthread_getspecific.3 pthread_join.3 \ | 107 | pthread_getspecific.3 pthread_join.3 \ | |
107 | pthread_key_create.3 pthread_key_delete.3 pthread_kill.3 \ | 108 | pthread_key_create.3 pthread_key_delete.3 pthread_kill.3 \ | |
108 | pthread_mutex_destroy.3 pthread_mutex_init.3 pthread_mutex_lock.3 \ | 109 | pthread_mutex_destroy.3 pthread_mutex_init.3 pthread_mutex_lock.3 \ | |
@@ -111,41 +112,42 @@ MAN+= affinity.3 pthread.3 \ | @@ -111,41 +112,42 @@ MAN+= affinity.3 pthread.3 \ | |||
111 | pthread_rwlock_rdlock.3 pthread_rwlock_unlock.3 \ | 112 | pthread_rwlock_rdlock.3 pthread_rwlock_unlock.3 \ | |
112 | pthread_rwlock_wrlock.3 pthread_rwlockattr.3 \ | 113 | pthread_rwlock_wrlock.3 pthread_rwlockattr.3 \ | |
113 | pthread_schedparam.3 pthread_self.3 \ | 114 | pthread_schedparam.3 pthread_self.3 \ | |
114 | pthread_setname_np.3 \ | 115 | pthread_setname_np.3 \ | |
115 | pthread_setspecific.3 pthread_sigmask.3 pthread_spin_destroy.3 \ | 116 | pthread_setspecific.3 pthread_sigmask.3 pthread_spin_destroy.3 \ | |
116 | pthread_spin_init.3 pthread_spin_lock.3 pthread_spin_unlock.3 \ | 117 | pthread_spin_init.3 pthread_spin_lock.3 pthread_spin_unlock.3 \ | |
117 | pthread_suspend_np.3 pthread_testcancel.3 | 118 | pthread_suspend_np.3 pthread_testcancel.3 | |
118 | 119 | |||
119 | MLINKS+= affinity.3 pthread_setaffinity_np.3 | 120 | MLINKS+= affinity.3 pthread_setaffinity_np.3 | |
120 | MLINKS+= affinity.3 pthread_getaffinity_np.3 | 121 | MLINKS+= affinity.3 pthread_getaffinity_np.3 | |
121 | 122 | |||
122 | MLINKS+= pthread_attr.3 pthread_attr_init.3 | 123 | MLINKS+= pthread_attr.3 pthread_attr_init.3 | |
123 | MLINKS+= pthread_attr.3 pthread_attr_destroy.3 | 124 | MLINKS+= pthread_attr.3 pthread_attr_destroy.3 | |
124 | MLINKS+= pthread_attr.3 pthread_attr_setstacksize.3 | |||
125 | MLINKS+= pthread_attr.3 pthread_attr_getstacksize.3 | |||
126 | MLINKS+= pthread_attr.3 pthread_attr_setguardsize.3 | 125 | MLINKS+= pthread_attr.3 pthread_attr_setguardsize.3 | |
127 | MLINKS+= pthread_attr.3 pthread_attr_getguardsize.3 | 126 | MLINKS+= pthread_attr.3 pthread_attr_getguardsize.3 | |
128 | MLINKS+= pthread_attr.3 pthread_attr_setstackaddr.3 | |||
129 | MLINKS+= pthread_attr.3 pthread_attr_getstackaddr.3 | |||
130 | MLINKS+= pthread_attr.3 pthread_attr_setinheritsched.3 | 127 | MLINKS+= pthread_attr.3 pthread_attr_setinheritsched.3 | |
131 | MLINKS+= pthread_attr.3 pthread_attr_getinheritsched.3 | 128 | MLINKS+= pthread_attr.3 pthread_attr_getinheritsched.3 | |
132 | MLINKS+= pthread_attr.3 pthread_attr_setschedparam.3 | 129 | MLINKS+= pthread_attr.3 pthread_attr_setschedparam.3 | |
133 | MLINKS+= pthread_attr.3 pthread_attr_getschedparam.3 | 130 | MLINKS+= pthread_attr.3 pthread_attr_getschedparam.3 | |
134 | MLINKS+= pthread_attr.3 pthread_attr_setschedpolicy.3 | 131 | MLINKS+= pthread_attr.3 pthread_attr_setschedpolicy.3 | |
135 | MLINKS+= pthread_attr.3 pthread_attr_getschedpolicy.3 | 132 | MLINKS+= pthread_attr.3 pthread_attr_getschedpolicy.3 | |
136 | 133 | |||
137 | MLINKS+= pthread_attr_getdetachstate.3 pthread_attr_setdetachstate.3 | 134 | MLINKS+= pthread_attr_getdetachstate.3 pthread_attr_setdetachstate.3 | |
138 | MLINKS+= pthread_attr_getscope.3 pthread_attr_setscope.3 | 135 | MLINKS+= pthread_attr_getscope.3 pthread_attr_setscope.3 | |
136 | MLINKS+= pthread_attr_getstack.3 pthread_attr_setstack.3 \ | |||
137 | pthread_attr_getstack.3 pthread_attr_getstacksize.3 \ | |||
138 | pthread_attr_getstack.3 pthread_attr_setstacksize.3 \ | |||
139 | pthread_attr_getstack.3 pthread_attr_getstackaddr.3 \ | |||
140 | pthread_attr_getstack.3 pthread_attr_setstackaddr.3 | |||
139 | 141 | |||
140 | MLINKS+= pthread_barrierattr.3 pthread_barrierattr_init.3 | 142 | MLINKS+= pthread_barrierattr.3 pthread_barrierattr_init.3 | |
141 | MLINKS+= pthread_barrierattr.3 pthread_barrierattr_destroy.3 | 143 | MLINKS+= pthread_barrierattr.3 pthread_barrierattr_destroy.3 | |
142 | MLINKS+= pthread_cleanup_push.3 pthread_cleanup_pop.3 | 144 | MLINKS+= pthread_cleanup_push.3 pthread_cleanup_pop.3 | |
143 | MLINKS+= pthread_cond_broadcast.3 pthread_cond_signal.3 | 145 | MLINKS+= pthread_cond_broadcast.3 pthread_cond_signal.3 | |
144 | MLINKS+= pthread_cond_wait.3 pthread_cond_timedwait.3 | 146 | MLINKS+= pthread_cond_wait.3 pthread_cond_timedwait.3 | |
145 | MLINKS+= pthread_condattr.3 pthread_condattr_init.3 | 147 | MLINKS+= pthread_condattr.3 pthread_condattr_init.3 | |
146 | MLINKS+= pthread_condattr.3 pthread_condattr_destroy.3 | 148 | MLINKS+= pthread_condattr.3 pthread_condattr_destroy.3 | |
147 | MLINKS+= pthread_mutex_lock.3 pthread_mutex_trylock.3 | 149 | MLINKS+= pthread_mutex_lock.3 pthread_mutex_trylock.3 | |
148 | MLINKS+= pthread_mutexattr.3 pthread_mutexattr_init.3 | 150 | MLINKS+= pthread_mutexattr.3 pthread_mutexattr_init.3 | |
149 | MLINKS+= pthread_mutexattr.3 pthread_mutexattr_destroy.3 | 151 | MLINKS+= pthread_mutexattr.3 pthread_mutexattr_destroy.3 | |
150 | MLINKS+= pthread_mutexattr.3 pthread_mutexattr_settype.3 | 152 | MLINKS+= pthread_mutexattr.3 pthread_mutexattr_settype.3 | |
151 | MLINKS+= pthread_mutexattr.3 pthread_mutexattr_gettype.3 | 153 | MLINKS+= pthread_mutexattr.3 pthread_mutexattr_gettype.3 |
--- src/lib/libpthread/pthread_attr.3 2010/07/07 08:57:36 1.13
+++ src/lib/libpthread/pthread_attr.3 2010/07/07 11:04:54 1.14
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | .\" $NetBSD: pthread_attr.3,v 1.13 2010/07/07 08:57:36 jruoho Exp $ | 1 | .\" $NetBSD: pthread_attr.3,v 1.14 2010/07/07 11:04:54 jruoho Exp $ | |
2 | .\" | 2 | .\" | |
3 | .\" Copyright (c) 2002 The NetBSD Foundation, Inc. | 3 | .\" Copyright (c) 2002 The NetBSD Foundation, Inc. | |
4 | .\" All rights reserved. | 4 | .\" All rights reserved. | |
5 | .\" | 5 | .\" | |
6 | .\" Redistribution and use in source and binary forms, with or without | 6 | .\" Redistribution and use in source and binary forms, with or without | |
7 | .\" modification, are permitted provided that the following conditions | 7 | .\" modification, are permitted provided that the following conditions | |
8 | .\" are met: | 8 | .\" are met: | |
9 | .\" 1. Redistributions of source code must retain the above copyright | 9 | .\" 1. Redistributions of source code must retain the above copyright | |
10 | .\" notice, this list of conditions and the following disclaimer. | 10 | .\" notice, this list of conditions and the following disclaimer. | |
11 | .\" 2. Redistributions in binary form must reproduce the above copyright | 11 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
12 | .\" notice, this list of conditions and the following disclaimer in the | 12 | .\" notice, this list of conditions and the following disclaimer in the | |
13 | .\" documentation and/or other materials provided with the distribution. | 13 | .\" documentation and/or other materials provided with the distribution. | |
14 | .\" | 14 | .\" | |
@@ -49,60 +49,48 @@ | @@ -49,60 +49,48 @@ | |||
49 | .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | 49 | .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | |
50 | .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | 50 | .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | |
51 | .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | 51 | .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | |
52 | .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 52 | .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
53 | .\" | 53 | .\" | |
54 | .\" $FreeBSD: src/lib/libpthread/man/pthread_attr.3,v 1.11 2002/09/16 19:29:28 mini Exp $ | 54 | .\" $FreeBSD: src/lib/libpthread/man/pthread_attr.3,v 1.11 2002/09/16 19:29:28 mini Exp $ | |
55 | .\" | 55 | .\" | |
56 | .Dd October 6, 2009 | 56 | .Dd October 6, 2009 | |
57 | .Dt PTHREAD_ATTR 3 | 57 | .Dt PTHREAD_ATTR 3 | |
58 | .Os | 58 | .Os | |
59 | .Sh NAME | 59 | .Sh NAME | |
60 | .Nm pthread_attr_init , | 60 | .Nm pthread_attr_init , | |
61 | .Nm pthread_attr_destroy , | 61 | .Nm pthread_attr_destroy , | |
62 | .Nm pthread_attr_setstacksize , | |||
63 | .Nm pthread_attr_getstacksize , | |||
64 | .Nm pthread_attr_setguardsize , | 62 | .Nm pthread_attr_setguardsize , | |
65 | .Nm pthread_attr_getguardsize , | 63 | .Nm pthread_attr_getguardsize , | |
66 | .Nm pthread_attr_setstackaddr , | |||
67 | .Nm pthread_attr_getstackaddr , | |||
68 | .Nm pthread_attr_setinheritsched , | 64 | .Nm pthread_attr_setinheritsched , | |
69 | .Nm pthread_attr_getinheritsched , | 65 | .Nm pthread_attr_getinheritsched , | |
70 | .Nm pthread_attr_setschedparam , | 66 | .Nm pthread_attr_setschedparam , | |
71 | .Nm pthread_attr_getschedparam | 67 | .Nm pthread_attr_getschedparam | |
72 | .Nm pthread_attr_setschedpolicy , | 68 | .Nm pthread_attr_setschedpolicy , | |
73 | .Nm pthread_attr_getschedpolicy | 69 | .Nm pthread_attr_getschedpolicy | |
74 | .Nd thread attribute operations | 70 | .Nd thread attribute operations | |
75 | .Sh LIBRARY | 71 | .Sh LIBRARY | |
76 | .Lb libpthread | 72 | .Lb libpthread | |
77 | .Sh SYNOPSIS | 73 | .Sh SYNOPSIS | |
78 | .In pthread.h | 74 | .In pthread.h | |
79 | .Ft int | 75 | .Ft int | |
80 | .Fn pthread_attr_init "pthread_attr_t *attr" | 76 | .Fn pthread_attr_init "pthread_attr_t *attr" | |
81 | .Ft int | 77 | .Ft int | |
82 | .Fn pthread_attr_destroy "pthread_attr_t *attr" | 78 | .Fn pthread_attr_destroy "pthread_attr_t *attr" | |
83 | .Ft int | 79 | .Ft int | |
84 | .Fn pthread_attr_setstacksize "pthread_attr_t *attr" "size_t stacksize" | |||
85 | .Ft int | |||
86 | .Fn pthread_attr_getstacksize "const pthread_attr_t * restrict attr" "size_t * restrict stacksize" | |||
87 | .Ft int | |||
88 | .Fn pthread_attr_setguardsize "pthread_attr_t *attr" "size_t guardsize" | 80 | .Fn pthread_attr_setguardsize "pthread_attr_t *attr" "size_t guardsize" | |
89 | .Ft int | 81 | .Ft int | |
90 | .Fn pthread_attr_getguardsize "const pthread_attr_t * restrict attr" "size_t * restrict guardsize" | 82 | .Fn pthread_attr_getguardsize "const pthread_attr_t * restrict attr" "size_t * restrict guardsize" | |
91 | .Ft int | 83 | .Ft int | |
92 | .Fn pthread_attr_setstackaddr "pthread_attr_t *attr" "void *stackaddr" | |||
93 | .Ft int | |||
94 | .Fn pthread_attr_getstackaddr "const pthread_attr_t * restrict attr" "void ** restrict stackaddr" | |||
95 | .Ft int | |||
96 | .Fn pthread_attr_setinheritsched "pthread_attr_t *attr" "int inheritsched" | 84 | .Fn pthread_attr_setinheritsched "pthread_attr_t *attr" "int inheritsched" | |
97 | .Ft int | 85 | .Ft int | |
98 | .Fn pthread_attr_getinheritsched "const pthread_attr_t * restrict attr" "int * restrict inheritsched" | 86 | .Fn pthread_attr_getinheritsched "const pthread_attr_t * restrict attr" "int * restrict inheritsched" | |
99 | .Ft int | 87 | .Ft int | |
100 | .Fn pthread_attr_setschedparam "pthread_attr_t * restrict attr" "const struct sched_param * restrict param" | 88 | .Fn pthread_attr_setschedparam "pthread_attr_t * restrict attr" "const struct sched_param * restrict param" | |
101 | .Ft int | 89 | .Ft int | |
102 | .Fn pthread_attr_getschedparam "const pthread_attr_t * restrict attr" "struct sched_param * restrict param" | 90 | .Fn pthread_attr_getschedparam "const pthread_attr_t * restrict attr" "struct sched_param * restrict param" | |
103 | .Ft int | 91 | .Ft int | |
104 | .Fn pthread_attr_setschedpolicy "pthread_attr_t *attr" "int policy" | 92 | .Fn pthread_attr_setschedpolicy "pthread_attr_t *attr" "int policy" | |
105 | .Ft int | 93 | .Ft int | |
106 | .Fn pthread_attr_getschedpolicy "const pthread_attr_t * restrict attr" "int * restrict policy" | 94 | .Fn pthread_attr_getschedpolicy "const pthread_attr_t * restrict attr" "int * restrict policy" | |
107 | .Sh DESCRIPTION | 95 | .Sh DESCRIPTION | |
108 | Thread attributes are used to specify parameters to | 96 | Thread attributes are used to specify parameters to | |
@@ -140,36 +128,27 @@ should fail if: | @@ -140,36 +128,27 @@ should fail if: | |||
140 | .It Bq Er ENOMEM | 128 | .It Bq Er ENOMEM | |
141 | Out of memory. | 129 | Out of memory. | |
142 | .El | 130 | .El | |
143 | .Pp | 131 | .Pp | |
144 | .Fn pthread_attr_destroy | 132 | .Fn pthread_attr_destroy | |
145 | may fail if: | 133 | may fail if: | |
146 | .Bl -tag -width Er | 134 | .Bl -tag -width Er | |
147 | .It Bq Er EINVAL | 135 | .It Bq Er EINVAL | |
148 | The value specified by | 136 | The value specified by | |
149 | .Fa attr | 137 | .Fa attr | |
150 | is invalid. | 138 | is invalid. | |
151 | .El | 139 | .El | |
152 | .Pp | 140 | .Pp | |
153 | .Fn pthread_attr_setstacksize | 141 | .Fn pthread_attr_setinheritsched | |
154 | may fail if: | |||
155 | .Bl -tag -width Er | |||
156 | .It Bq Er EINVAL | |||
157 | .Fa stacksize | |||
158 | is less than | |||
159 | .Dv PTHREAD_STACK_MIN . | |||
160 | .El | |||
161 | .Pp | |||
162 | Fn pthread_attr_setinheritsched | |||
163 | may fail if: | 142 | may fail if: | |
164 | .Bl -tag -width Er | 143 | .Bl -tag -width Er | |
165 | .It Bq Er EINVAL | 144 | .It Bq Er EINVAL | |
166 | Invalid value for | 145 | Invalid value for | |
167 | .Fa attr . | 146 | .Fa attr . | |
168 | .El | 147 | .El | |
169 | .Pp | 148 | .Pp | |
170 | .Fn pthread_attr_setschedparam | 149 | .Fn pthread_attr_setschedparam | |
171 | may fail if: | 150 | may fail if: | |
172 | .Bl -tag -width Er | 151 | .Bl -tag -width Er | |
173 | .It Bq Er EINVAL | 152 | .It Bq Er EINVAL | |
174 | The value specified by | 153 | The value specified by | |
175 | .Fa attr | 154 | .Fa attr | |
@@ -186,28 +165,24 @@ may fail if: | @@ -186,28 +165,24 @@ may fail if: | |||
186 | .It Bq Er EINVAL | 165 | .It Bq Er EINVAL | |
187 | Invalid value for | 166 | Invalid value for | |
188 | .Fa attr . | 167 | .Fa attr . | |
189 | .It Bq Er ENOTSUP | 168 | .It Bq Er ENOTSUP | |
190 | Invalid or unsupported value for | 169 | Invalid or unsupported value for | |
191 | .Fa policy . | 170 | .Fa policy . | |
192 | .El | 171 | .El | |
193 | .Sh SEE ALSO | 172 | .Sh SEE ALSO | |
194 | .Xr pthread_create 3 , | 173 | .Xr pthread_create 3 , | |
195 | .Xr pthread_join 3 | 174 | .Xr pthread_join 3 | |
196 | .Sh STANDARDS | 175 | .Sh STANDARDS | |
197 | .Fn pthread_attr_init , | 176 | .Fn pthread_attr_init , | |
198 | .Fn pthread_attr_destroy , | 177 | .Fn pthread_attr_destroy , | |
199 | .Fn pthread_attr_setstacksize , | |||
200 | .Fn pthread_attr_getstacksize , | |||
201 | .Fn pthread_attr_setstackaddr , | |||
202 | .Fn pthread_attr_getstackaddr , | |||
203 | .Fn pthread_attr_setinheritsched , | 178 | .Fn pthread_attr_setinheritsched , | |
204 | .Fn pthread_attr_getinheritsched , | 179 | .Fn pthread_attr_getinheritsched , | |
205 | .Fn pthread_attr_setschedparam , | 180 | .Fn pthread_attr_setschedparam , | |
206 | .Fn pthread_attr_setschedparam , | 181 | .Fn pthread_attr_setschedparam , | |
207 | and | 182 | and | |
208 | .Fn pthread_attr_getschedparam | 183 | .Fn pthread_attr_getschedparam | |
209 | .Fn pthread_attr_setschedpolicy , | 184 | .Fn pthread_attr_setschedpolicy , | |
210 | and | 185 | and | |
211 | .Fn pthread_attr_getschedpolicy | 186 | .Fn pthread_attr_getschedpolicy | |
212 | conform to | 187 | conform to | |
213 | .St -p1003.1-96 . | 188 | .St -p1003.1-96 . |
.\" $NetBSD: pthread_attr_getstack.3,v 1.1 2010/07/07 11:04:54 jruoho Exp $
.\"
.\" Copyright (c) 2010 Jukka Ruohonen <jruohonen@iki.fi>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd July 7, 2010
.Dt PTHREAD_ATTR_GETSTACK 3
.Os
.Sh NAME
.Nm pthread_attr_getstack
.Nd get and set thread stack attributes
.Sh LIBRARY
.Lb libpthread
.Sh SYNOPSIS
.In pthread.h
.Ft int
.Fn pthread_attr_getstack \
"const pthread_attr_t * restrict attr" \
"void ** restrict stackaddr, size_t * restrict stacksize"
.Ft int
.Fn pthread_attr_setstack \
"pthread_attr_t * restrict attr" "void *stackaddr, size_t stacksize"
.Ft int
.Fn pthread_attr_getstacksize \
"const pthread_attr_t * restrict attr" "size_t * restrict stacksize"
.Ft int
.Fn pthread_attr_setstacksize \
"pthread_attr_t *attr" "size_t stacksize"
.Ft int
.Fn pthread_attr_getstackaddr \
"const pthread_attr_t * restrict attr" "void ** restrict stackaddr"
.Ft int
.Fn pthread_attr_setstackaddr \
"pthread_attr_t *attr" "void *stackaddr"
.Sh DESCRIPTION
The
.Fn pthread_attr_getstack
and
.Fn pthread_attr_setstack
functions get and set, respectively, the thread stack attributes
.Fa stackaddr
and
.Fa stacksize
in the
.Fa attr
object.
The remaining four functions behave similarly,
but instead of getting or setting both
.Fa stackaddr
and
.Fa stacksize ,
these get and set the values individually.
.Pp
The
.Fa stacksize
parameter is defined to be the minimum stack size (in bytes)
allocated for the thread's stack during the creation of the thread.
The
.Fa stackaddr
attribute specifies the location of storage to be used for the thread's stack.
All pages within the stack described by
.Fa stackaddr
and
.Fa stacksize
are both readable and writable by the thread.
.Pp
The behavior is undefined in all functions if the
.Fa attr
parameter does not refer to an attribute object initialized by using
.Xr pthread_attr_init 3
prior to the call.
In addition, undefined behavior may follow if the
.Fn pthread_attr_getstack
function is called before the
.Fa stackaddr
attribute has been set.
.Sh RATIONALE
The rationale behind these functions is to address cases where an application
may be used in an environment where the stack of a thread must be placed to
some particular region of memory.
For the majority of applications, this is seldom necessary,
and the use of these functions should be generally avoided.
At least few potential caveats can be mentioned.
.Bl -bullet -offset 2n
.It
There is a certain degree of ambiguity in the
.Tn POSIX
standard with respect to thread stack.
.It
The exact behavior of the functions may vary
both across machines and operating systems.
In particular, the address specified by
.Fa stackaddr
should be suitably aligned.
The system page size, as specified by
.Xr sysconf 3 ,
and the use of
.Xr posix_memalign 3
may guarantee some degree of portability.
.It
If the application modifies the stack address, it claims also
the responsibility of allocating the stack area and guarding it against
possible stack overflow.
This implies that the application may need to also allocate a suitable
guard area that is protected from reading and writing.
.It
Moreoever, if
.Fa attr
is used to create multiple threads, the stack address must be changed
by the application between successive calls to
.Xr pthread_create 3 .
.El
.Sh RETURN VALUES
If successful, these functions return 0.
Otherwise, an error number is returned to indicate the error.
.Sh ERRORS
No errors are defined for the three functions that obtain the stack values.
The three functions that set the stack values may fail if:
.Bl -tag -width Er
.It Bq Er ENOMEM
There was insufficient memory to complete the operation.
.El
.Pp
The
.Fn pthread_attr_setstacksize
function may additionally fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
The specified
.Fa stacksize
is less than
.Dv PTHREAD_STACK_MIN
or exceeds some system-imposed limit.
.El
.Sh SEE ALSO
.Xr pthread_attr 3
.Sh STANDARDS
The
.Fn pthread_attr_getstack
and
.Fn pthread_attr_setstack
functions as well as
.Fn pthread_attr_getstacksize
and
.Fn pthread_attr_setstacksize
conform to
.St -p1003.1-2008 .
The
.Fn pthread_attr_getstackaddr
and
.Fn pthread_attr_setstackaddr
conform to
.St -p1003.1-2004 ,
where these were marked as obsolescent due concerns about portability.
The 2008 revision removed these two functions from the specification.