head 1.6; access; symbols pkgsrc-2026Q1:1.6.0.158 pkgsrc-2026Q1-base:1.6 pkgsrc-2025Q4:1.6.0.156 pkgsrc-2025Q4-base:1.6 pkgsrc-2025Q3:1.6.0.154 pkgsrc-2025Q3-base:1.6 pkgsrc-2025Q2:1.6.0.152 pkgsrc-2025Q2-base:1.6 pkgsrc-2025Q1:1.6.0.150 pkgsrc-2025Q1-base:1.6 pkgsrc-2024Q4:1.6.0.148 pkgsrc-2024Q4-base:1.6 pkgsrc-2024Q3:1.6.0.146 pkgsrc-2024Q3-base:1.6 pkgsrc-2024Q2:1.6.0.144 pkgsrc-2024Q2-base:1.6 pkgsrc-2024Q1:1.6.0.142 pkgsrc-2024Q1-base:1.6 pkgsrc-2023Q4:1.6.0.140 pkgsrc-2023Q4-base:1.6 pkgsrc-2023Q3:1.6.0.138 pkgsrc-2023Q3-base:1.6 pkgsrc-2023Q2:1.6.0.136 pkgsrc-2023Q2-base:1.6 pkgsrc-2023Q1:1.6.0.134 pkgsrc-2023Q1-base:1.6 pkgsrc-2022Q4:1.6.0.132 pkgsrc-2022Q4-base:1.6 pkgsrc-2022Q3:1.6.0.130 pkgsrc-2022Q3-base:1.6 pkgsrc-2022Q2:1.6.0.128 pkgsrc-2022Q2-base:1.6 pkgsrc-2022Q1:1.6.0.126 pkgsrc-2022Q1-base:1.6 pkgsrc-2021Q4:1.6.0.124 pkgsrc-2021Q4-base:1.6 pkgsrc-2021Q3:1.6.0.122 pkgsrc-2021Q3-base:1.6 pkgsrc-2021Q2:1.6.0.120 pkgsrc-2021Q2-base:1.6 pkgsrc-2021Q1:1.6.0.118 pkgsrc-2021Q1-base:1.6 pkgsrc-2020Q4:1.6.0.116 pkgsrc-2020Q4-base:1.6 pkgsrc-2020Q3:1.6.0.114 pkgsrc-2020Q3-base:1.6 pkgsrc-2020Q2:1.6.0.110 pkgsrc-2020Q2-base:1.6 pkgsrc-2020Q1:1.6.0.90 pkgsrc-2020Q1-base:1.6 pkgsrc-2019Q4:1.6.0.112 pkgsrc-2019Q4-base:1.6 pkgsrc-2019Q3:1.6.0.108 pkgsrc-2019Q3-base:1.6 pkgsrc-2019Q2:1.6.0.106 pkgsrc-2019Q2-base:1.6 pkgsrc-2019Q1:1.6.0.104 pkgsrc-2019Q1-base:1.6 pkgsrc-2018Q4:1.6.0.102 pkgsrc-2018Q4-base:1.6 pkgsrc-2018Q3:1.6.0.100 pkgsrc-2018Q3-base:1.6 pkgsrc-2018Q2:1.6.0.98 pkgsrc-2018Q2-base:1.6 pkgsrc-2018Q1:1.6.0.96 pkgsrc-2018Q1-base:1.6 pkgsrc-2017Q4:1.6.0.94 pkgsrc-2017Q4-base:1.6 pkgsrc-2017Q3:1.6.0.92 pkgsrc-2017Q3-base:1.6 pkgsrc-2017Q2:1.6.0.88 pkgsrc-2017Q2-base:1.6 pkgsrc-2017Q1:1.6.0.86 pkgsrc-2017Q1-base:1.6 pkgsrc-2016Q4:1.6.0.84 pkgsrc-2016Q4-base:1.6 pkgsrc-2016Q3:1.6.0.82 pkgsrc-2016Q3-base:1.6 pkgsrc-2016Q2:1.6.0.80 pkgsrc-2016Q2-base:1.6 pkgsrc-2016Q1:1.6.0.78 pkgsrc-2016Q1-base:1.6 pkgsrc-2015Q4:1.6.0.76 pkgsrc-2015Q4-base:1.6 pkgsrc-2015Q3:1.6.0.74 pkgsrc-2015Q3-base:1.6 pkgsrc-2015Q2:1.6.0.72 pkgsrc-2015Q2-base:1.6 pkgsrc-2015Q1:1.6.0.70 pkgsrc-2015Q1-base:1.6 pkgsrc-2014Q4:1.6.0.68 pkgsrc-2014Q4-base:1.6 pkgsrc-2014Q3:1.6.0.66 pkgsrc-2014Q3-base:1.6 pkgsrc-2014Q2:1.6.0.64 pkgsrc-2014Q2-base:1.6 pkgsrc-2014Q1:1.6.0.62 pkgsrc-2014Q1-base:1.6 pkgsrc-2013Q4:1.6.0.60 pkgsrc-2013Q4-base:1.6 pkgsrc-2013Q3:1.6.0.58 pkgsrc-2013Q3-base:1.6 pkgsrc-2013Q2:1.6.0.56 pkgsrc-2013Q2-base:1.6 pkgsrc-2013Q1:1.6.0.54 pkgsrc-2013Q1-base:1.6 pkgsrc-2012Q4:1.6.0.52 pkgsrc-2012Q4-base:1.6 pkgsrc-2012Q3:1.6.0.50 pkgsrc-2012Q3-base:1.6 pkgsrc-2012Q2:1.6.0.48 pkgsrc-2012Q2-base:1.6 pkgsrc-2012Q1:1.6.0.46 pkgsrc-2012Q1-base:1.6 pkgsrc-2011Q4:1.6.0.44 pkgsrc-2011Q4-base:1.6 pkgsrc-2011Q3:1.6.0.42 pkgsrc-2011Q3-base:1.6 pkgsrc-2011Q2:1.6.0.40 pkgsrc-2011Q2-base:1.6 pkgsrc-2011Q1:1.6.0.38 pkgsrc-2011Q1-base:1.6 pkgsrc-2010Q4:1.6.0.36 pkgsrc-2010Q4-base:1.6 pkgsrc-2010Q3:1.6.0.34 pkgsrc-2010Q3-base:1.6 pkgsrc-2010Q2:1.6.0.32 pkgsrc-2010Q2-base:1.6 pkgsrc-2010Q1:1.6.0.30 pkgsrc-2010Q1-base:1.6 pkgsrc-2009Q4:1.6.0.28 pkgsrc-2009Q4-base:1.6 pkgsrc-2009Q3:1.6.0.26 pkgsrc-2009Q3-base:1.6 pkgsrc-2009Q2:1.6.0.24 pkgsrc-2009Q2-base:1.6 pkgsrc-2009Q1:1.6.0.22 pkgsrc-2009Q1-base:1.6 pkgsrc-2008Q4:1.6.0.20 pkgsrc-2008Q4-base:1.6 pkgsrc-2008Q3:1.6.0.18 pkgsrc-2008Q3-base:1.6 cube-native-xorg:1.6.0.16 cube-native-xorg-base:1.6 pkgsrc-2008Q2:1.6.0.14 pkgsrc-2008Q2-base:1.6 cwrapper:1.6.0.12 pkgsrc-2008Q1:1.6.0.10 pkgsrc-2008Q1-base:1.6 pkgsrc-2007Q4:1.6.0.8 pkgsrc-2007Q4-base:1.6 pkgsrc-2007Q3:1.6.0.6 pkgsrc-2007Q3-base:1.6 pkgsrc-2007Q2:1.6.0.4 pkgsrc-2007Q2-base:1.6 pkgsrc-2007Q1:1.6.0.2 pkgsrc-2007Q1-base:1.6 pkgsrc-2006Q4:1.5.0.26 pkgsrc-2006Q4-base:1.5 pkgsrc-2006Q3:1.5.0.24 pkgsrc-2006Q3-base:1.5 pkgsrc-2006Q2:1.5.0.22 pkgsrc-2006Q2-base:1.5 pkgsrc-2006Q1:1.5.0.20 pkgsrc-2006Q1-base:1.5 pkgsrc-2005Q4:1.5.0.18 pkgsrc-2005Q4-base:1.5 pkgsrc-2005Q3:1.5.0.16 pkgsrc-2005Q3-base:1.5 pkgsrc-2005Q2:1.5.0.14 pkgsrc-2005Q2-base:1.5 pkgsrc-2005Q1:1.5.0.12 pkgsrc-2005Q1-base:1.5 pkgsrc-2004Q4:1.5.0.10 pkgsrc-2004Q4-base:1.5 pkgsrc-2004Q3:1.5.0.8 pkgsrc-2004Q3-base:1.5 pkgsrc-2004Q2:1.5.0.6 pkgsrc-2004Q2-base:1.5 pkgsrc-2004Q1:1.5.0.4 pkgsrc-2004Q1-base:1.5 pkgsrc-2003Q4:1.5.0.2 pkgsrc-2003Q4-base:1.5 netbsd-1-6-1:1.4.0.2 netbsd-1-6-1-base:1.4 buildlink2-base:1.1 buildlink2:1.1.0.2 netbsd-1-6:1.1.0.4 netbsd-1-6-RELEASE-base:1.1; locks; strict; comment @# @; 1.6 date 2007.02.18.11.40.10; author wiz; state Exp; branches; next 1.5; 1.5 date 2003.05.02.11.49.48; author wiz; state Exp; branches; next 1.4; 1.4 date 2002.11.26.21.42.49; author skrll; state Exp; branches; next 1.3; 1.3 date 2002.10.14.11.49.56; author skrll; state Exp; branches; next 1.2; 1.2 date 2002.08.25.18.38.45; author jlam; state Exp; branches; next 1.1; 1.1 date 2002.08.01.13.36.09; author skrll; state Exp; branches 1.1.2.1; next ; 1.1.2.1 date 2002.08.01.13.36.09; author jlam; state dead; branches; next 1.1.2.2; 1.1.2.2 date 2002.08.22.11.11.02; author jlam; state Exp; branches; next ; desc @@ 1.6 log @Update to 2.0.7: Changes between 2.0.6 and 2.0.7 (22-Nov-2005 to 08-Jun-2006) *) Let AC_CHECK_PTH use "pth-config --libs --all" instead of just "pth-config --libs" to allow it to work under platforms like Solaris where additional libraries are required. [Ralf S. Engelschall] Changes between 2.0.5 and 2.0.6 (05-Oct-2005 to 22-Nov-2005) *) Add a missing "break" in pth_attr.c:pth_attr_ctrl(). [Stefan Schippers ] *) Return an error if pth_kill() is called before pth_init(). [Martin Kraemer ] Changes between 2.0.3 and 2.0.4 (03-Dec-2004 to 18-Feb-2005) *) Fix internal determination of maximum number in a size_t in the string formatter engine. [Ralf S. Engelschall] *) Add quotes around function names for AC_DEFUN in pth.m4 to avoid warnings about "underquoted definitions". [Stephane Loeuillet ] *) Do not insist on writing to the source directory on "make install" in order to more closely follow GNU standards. [Bruno Haible ] *) Remove "*.bak" and "*~" files under "make distclean" instead of "make clean". [Bruno Haible ] Changes between 2.0.2 and 2.0.3 (12-Sep-2004 to 03-Dec-2004) *) Resurrect the old "make striptease" command by fixing the configure run-time in the stripped down source tree and fixing the list of source files. [Ralf S. Engelschall] *) The pth_uctx_save() and pth_uctx_restore() API functions unfortunately were broken by design because they are C _functions_. This leads to one more deadly nesting on the run-time stack which effectively caused the pth_mctx_restore() in pth_uctx_restore() to return to the end of pth_uctx_save() but then the control flow unfortunately returns to the pth_uctx_restore() caller instead of the pth_uctx_save() caller because the call to pth_uctx_restore() had already overwritten the run-time stack position where the original return address for the pth_uctx_save() call was stored. The only workaround would be to #define pth_uctx_save() and pth_uctx_restore() as C _macros_, but this then would require that lots of the GNU Pth internals from pth_mctx.c would have to be exported in the GNU Pth API (which in turn is not acceptable). So, the only consequence is to remove the two functions again from the GNU Pth API. [Ralf S. Engelschall, Stefan Brantschen ] *) Enhance internal pth_mctx_save() if getcontext(3) is used for the machine context saving by better emulating the setjmp(3) style return code semantics. [Ralf S. Engelschall] *) Do not break in pth_msgport_find() if a message port was created with a NULL name. [Ralf S. Engelschall] *) Better error checking in pth_key_xxx() functions. [Ralf S. Engelschall] *) Added PTH_CTRL_FAVOURNEW control which allows the user to disable the favouring of new threads on scheduling to get more strict priority based scheduling behavior. [Ralf S. Engelschall, Vinu V ] Changes between 2.0.1 and 2.0.2 (13-Jul-2004 to 12-Sep-2004) *) Added hard syscall wrappers for send(2) and recv(2). [NetBSD pkgsrc patches] *) Internally handle errors returned from pth_event() in order to pass them upstream to the caller in pth_high.c functions. [Ralf S. Engelschall, NetBSD pkgsrc patches] *) Fix syscall wrapper for sendto(2). [NetBSD pkgsrc patches] *) Use "(char *)NULL" instead of plain "NULL" in last argument to execl(2) to avoid GCC 3.5's "warning: missing sentinel in function call". [Ralf S. Engelschall] *) Workaround Autoconf/m4 problems in pth.m4 by using "m4_define" instead of just "define" and no using m4_undefine at all. [Dr. Andreas Mueller ] *) Avoid side-effects by defining _XOPEN_SOURCE only temporarily for inclusion of instead of permanently. [Graham Nash ] *) Workaround GCC 2.x and 3.5 (3.4 worked fine) macro parsing behaviour by using a pre-declared function pointer type "typedef int (*pth_event_func_t)(void *);" instead of using an inlined "int (*)(void *)". [Ralf S. Engelschall, Robert Anderson ] *) Fixed prototype for pthread_attr_setschedparam(3) from to use a "const struct sched_param *" argument. [Rafael Ávila de Espíndola ] Changes between 2.0.0 and 2.0.1 (17-Feb-2003 to 13-Jul-2004) *) Fix handling/casting of "int (*)(void *)" callback functions. [Ralf S. Engelschall] *) Resolve symbol conflict in pth_string.c between pow10/round and GCC builtins. [Ralf S. Engelschall] *) Use GCC 3.3 option "-fno-strict-aliasing" (if available) under Autoconf option "--enable-debug" because mainly pth_mctx.c contains important and correct pointer casting constructs which are not acceptable in "strict aliasing" for GCC. [Ralf S. Engelschall] *) Fixed implementation so that --enable-pthread now correctly implies --enable-syscall-soft. [Steve Alstrin , Ralf S. Engelschall] *) Replace some 0 by more politically correct NULL in pth_string.c [Ralf S. Engelschall] @ text @$NetBSD: patch-ag,v 1.5 2003/05/02 11:49:48 wiz Exp $ --- pth_lib.c.orig 2006-06-08 17:54:03.000000000 +0000 +++ pth_lib.c @@@@ -37,10 +37,11 @@@@ long pth_version(void) /* implicit initialization support */ intern int pth_initialized = FALSE; +intern int pth_explicit_initialize = FALSE; #if cpp #define pth_implicit_init() \ if (!pth_initialized) \ - pth_init(); + pth__init(); #endif #ifdef PTH_EX @@@@ -55,19 +56,13 @@@@ static void pth_ex_terminate(ex_t *ex) } #endif -/* initialize the package */ -int pth_init(void) +int pth__init(void) { pth_attr_t t_attr; - /* support for implicit initialization calls - and to prevent multiple explict initialization, too */ - if (pth_initialized) - return pth_error(FALSE, EPERM); - else - pth_initialized = TRUE; + pth_initialized = TRUE; - pth_debug1("pth_init: enter"); + pth_debug1("pth__init: enter"); /* initialize syscall wrapping */ pth_syscall_init(); @@@@ -131,10 +126,29 @@@@ int pth_init(void) pth_mctx_switch(&pth_main->mctx, &pth_sched->mctx); /* came back, so let's go home... */ - pth_debug1("pth_init: leave"); + pth_debug1("pth__init: leave"); return TRUE; } +/* initialize the package */ +int pth_init(void) +{ + int rv; + + /* support for implicit initialization calls + and to prevent multiple explict initialization, too */ + if (pth_initialized) { + /* if we've already explicitly initialized then error */ + if (pth_explicit_initialize) + return pth_error(FALSE, EPERM); + rv = TRUE; + } else { + rv = pth__init(); + pth_explicit_initialize = TRUE; + } + return rv; +} + /* kill the package internals */ int pth_kill(void) { @@@@ -146,6 +160,7 @@@@ int pth_kill(void) pth_thread_cleanup(pth_main); pth_scheduler_kill(); pth_initialized = FALSE; + pth_explicit_initialize = FALSE; pth_tcb_free(pth_sched); pth_tcb_free(pth_main); pth_syscall_kill(); @ 1.5 log @Update to 2.0.0, supplied by skrll@@netbsd. Changes: *) Make pth_poll(3) more compliant to POSIX.1-2001/SUSv3 poll(2). *) Make pth_select(3) more compliant to POSIX.1-2001/SUSv3 select(2). *) Replaced pth_event_occurred() with pth_event_status(). *) Add Autoconf option --with-fdsetsize=NUM for enlarging FD_SETSIZE. *) Added thread attribute PTH_ATTR_DISPATCHES. *) Added sub-API pth_uctx_* for user-space context switching. *) Add a Pth variant of the new POSIX pselect(2) function. *) Internally cleaned up the error handling macros. *) Added POSIX-compliant sanity checks for bad fds. *) Added pth_nanosleep() function. *) Allow a NULL name for pth_msgport_create() *) Completely rewrote the "hard syscall mapping". *) Added support to pth_poll(3) for POLLD{RD,WR}{NORM,BAND}. *) Fixed a long-standing termination bug in pth_exit(3). *) Upgraded to Autoconf 2.57, Shtool 1.6.2 and Libtool 1.4.3. *) Add optional support for OSSP ex based exception handling. @ text @d1 1 a1 1 $NetBSD$ d3 1 a3 1 --- pth_lib.c.orig Wed Jan 1 15:45:06 2003 d72 1 a72 1 @@@@ -144,6 +158,7 @@@@ int pth_kill(void) @ 1.4 log @Improve error handling. Patches backported from pth -current. PKGREVISION++ This fixes PR 19162 from Ingolf Steinbach. @ text @d3 1 a3 1 --- pth_lib.c.orig Sun Jan 27 11:03:40 2002 d5 1 a5 1 @@@@ -37,28 +37,25 @@@@ long pth_version(void) a9 1 + d14 6 a19 1 + pth__init(); d24 1 a24 1 +intern int pth__init(void) d31 1 a31 1 - return_errno(FALSE, EPERM); d39 3 a41 8 /* initialize the scheduler */ - pth_scheduler_init(); + if (!pth_scheduler_init()) + return_errno(FALSE, EAGAIN); /* spawn the scheduler thread */ t_attr = pth_attr_new(); @@@@ -105,10 +102,29 @@@@ int pth_init(void) d60 1 a60 1 + return_errno(FALSE, EPERM); d72 1 a72 1 @@@@ -118,6 +134,7 @@@@ int pth_kill(void) d79 1 a79 9 pth_debug1("pth_kill: leave"); @@@@ -182,6 +199,7 @@@@ static void pth_spawn_trampoline(void) /* no return! */ abort(); } + pth_t pth_spawn(pth_attr_t attr, void *(*func)(void *), void *arg) { pth_t t; @ 1.3 log @Various updates and fixes that I've collected recently: * Provide nanosleep(2) and usleep(3) wrappers. * Make sure sigprocmask syscalls are used in pth_system. * "Fix" FD_SET handling in the select(2) wrapper so that mismatches between pth FD_SETSIZE and user program FD_SETSIZE don't cause problems. * Update poll(2) wrapper to be more poll(2) like - in particular never return EINVAL for bad file descriptors Thanks to Matthias Drochner for this. * Improve error handling in connect(2) wrapper so that we don't confuse the scheduler. This fixes pkg/17944 from Christian Biere (ChristianBiere at gmx dot de) * Introduce autoconf handling of the value of FD_SETSIZE used by pth. If we have to hard code a value we might as well make it easy to change and make the inclusion of pth.h or pthread.h by a program that re-defines FD_SETSIZE an error. Inspired by pkg/17944. * Fix a compiler warning that I introduced a little while ago. * Disable --enable-syscall-hard for non-NetBSD platforms and for pre-1.6/m68k. Make a note of the PRs that need fixing. This closes pkg/18236 from Klaus Heinz (k dot heinz dot sep dot zwei at onlinehome dot de) The FD_SETSIZE problems would be handled better if pth was changed to use poll(2), and not select(2), internally. @ text @d5 1 a5 1 @@@@ -37,25 +37,21 @@@@ long pth_version(void) d36 7 a42 2 pth_scheduler_init(); @@@@ -105,10 +101,29 @@@@ int pth_init(void) d73 1 a73 1 @@@@ -118,6 +133,7 @@@@ int pth_kill(void) d81 1 a81 1 @@@@ -182,6 +198,7 @@@@ static void pth_spawn_trampoline(void) @ 1.2 log @Merge changes in packages from the buildlink2 branch that have buildlink2.mk files back into the main trunk. This provides sufficient buildlink2 infrastructure to start merging other packages from the buildlink2 branch that have already been converted to use the buildlink2 framework. @ text @d1 1 a1 1 $NetBSD: patch-ag,v 1.1.2.1 2002/08/22 11:11:02 jlam Exp $ d37 1 a37 1 @@@@ -105,10 +101,28 @@@@ int pth_init(void) d57 1 a60 1 + return rv; d62 1 d68 1 a68 1 @@@@ -118,6 +132,7 @@@@ int pth_kill(void) d76 1 a76 1 @@@@ -182,6 +197,7 @@@@ static void pth_spawn_trampoline(void) @ 1.1 log @Apply a fix to the initialization routine so that make test works with --enable-syscall-hard. Allow -O2 optimisation of i386 - the reason this was removed is somewhat bogus. Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD$ @ 1.1.2.1 log @file patch-ag was added on branch buildlink2 on 2002-08-22 11:11:02 +0000 @ text @d1 82 @ 1.1.2.2 log @Merge changes from pkgsrc-current into the buildlink2 branch for the packages that have buildlink2.mk files. @ text @a0 82 $NetBSD: patch-ag,v 1.1.2.1 2002/08/22 11:11:02 jlam Exp $ --- pth_lib.c.orig Sun Jan 27 11:03:40 2002 +++ pth_lib.c @@@@ -37,25 +37,21 @@@@ long pth_version(void) /* implicit initialization support */ intern int pth_initialized = FALSE; +intern int pth_explicit_initialize = FALSE; + #if cpp #define pth_implicit_init() \ if (!pth_initialized) \ - pth_init(); + pth__init(); #endif -/* initialize the package */ -int pth_init(void) +intern int pth__init(void) { pth_attr_t t_attr; - /* support for implicit initialization calls - and to prevent multiple explict initialization, too */ - if (pth_initialized) - return_errno(FALSE, EPERM); - else - pth_initialized = TRUE; + pth_initialized = TRUE; - pth_debug1("pth_init: enter"); + pth_debug1("pth__init: enter"); /* initialize the scheduler */ pth_scheduler_init(); @@@@ -105,10 +101,28 @@@@ int pth_init(void) pth_mctx_switch(&pth_main->mctx, &pth_sched->mctx); /* came back, so let's go home... */ - pth_debug1("pth_init: leave"); + pth_debug1("pth__init: leave"); return TRUE; } +/* initialize the package */ +int pth_init(void) +{ + int rv; + + /* support for implicit initialization calls + and to prevent multiple explict initialization, too */ + if (pth_initialized) { + /* if we've already explicitly initialized then error */ + if (pth_explicit_initialize) + return_errno(FALSE, EPERM); + } else { + rv = pth__init(); + pth_explicit_initialize = TRUE; + return rv; + } +} + /* kill the package internals */ int pth_kill(void) { @@@@ -118,6 +132,7 @@@@ int pth_kill(void) pth_thread_cleanup(pth_main); pth_scheduler_kill(); pth_initialized = FALSE; + pth_explicit_initialize = FALSE; pth_tcb_free(pth_sched); pth_tcb_free(pth_main); pth_debug1("pth_kill: leave"); @@@@ -182,6 +197,7 @@@@ static void pth_spawn_trampoline(void) /* no return! */ abort(); } + pth_t pth_spawn(pth_attr_t attr, void *(*func)(void *), void *arg) { pth_t t; @