head 1.6; access; symbols netbsd-11-0-RC7:1.2.2.1 netbsd-11-0-RC6:1.2.2.1 netbsd-11-0-RC5:1.2.2.1 netbsd-11-0-RC4:1.2.2.1 netbsd-11-0-RC3:1.2.2.1 netbsd-11-0-RC2:1.2.2.1 netbsd-11-0-RC1:1.2.2.1 perseant-exfatfs:1.2.0.4 perseant-exfatfs-base-20250801:1.2 netbsd-11:1.2.0.2 netbsd-11-base:1.2; locks; strict; comment @# @; 1.6 date 2026.05.01.11.00.21; author wiz; state Exp; branches; next 1.5; commitid H5M6p9ZXBn1mk6EG; 1.5 date 2025.10.27.16.29.15; author christos; state Exp; branches; next 1.4; commitid 7ln6hKuChcR28egG; 1.4 date 2025.10.26.20.48.28; author christos; state Exp; branches; next 1.3; commitid U0QR1DhNshttA7gG; 1.3 date 2025.10.06.13.12.30; author riastradh; state Exp; branches; next 1.2; commitid kmkLD4NXoGmtIvdG; 1.2 date 2025.03.31.14.23.11; author riastradh; state Exp; branches 1.2.2.1 1.2.4.1; next 1.1; commitid 3uWLHDgSHqUmbePF; 1.1 date 2024.11.22.15.51.34; author riastradh; state Exp; branches; next ; commitid VI7h249aKEMMOEyF; 1.2.2.1 date 2025.11.20.18.46.42; author martin; state Exp; branches; next ; commitid ggkiZDsnElnr7kjG; 1.2.4.1 date 2025.03.31.14.23.11; author perseant; state dead; branches; next 1.2.4.2; commitid 23j6GFaDws3O875G; 1.2.4.2 date 2025.08.02.05.54.55; author perseant; state Exp; branches; next ; commitid 23j6GFaDws3O875G; desc @@ 1.6 log @libpthread: add pthread_main_np(3) Bump minor version of the shared library. As proposed on current-users. @ text @___msync13 ___nanosleep50 __aio_suspend50 __kevent100 __libc_cond_broadcast __libc_cond_destroy __libc_cond_init __libc_cond_signal __libc_cond_timedwait __libc_cond_wait __libc_mutex_destroy __libc_mutex_init __libc_mutex_lock __libc_mutex_trylock __libc_mutex_unlock __libc_mutexattr_destroy __libc_mutexattr_init __libc_mutexattr_settype __libc_rwlock_destroy __libc_rwlock_init __libc_rwlock_rdlock __libc_rwlock_tryrdlock __libc_rwlock_trywrlock __libc_rwlock_unlock __libc_rwlock_wrlock __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_create __libc_thr_curcpu __libc_thr_detach __libc_thr_equal __libc_thr_errno __libc_thr_exit __libc_thr_getspecific __libc_thr_init __libc_thr_join __libc_thr_keycreate __libc_thr_keydelete __libc_thr_once __libc_thr_self __libc_thr_setcancelstate __libc_thr_setspecific __libc_thr_sigsetmask __libc_thr_yield __mq_timedreceive50 __mq_timedsend50 __msync13 __nanosleep50 __pollts50 __pselect50 __res_get_state __res_put_state __res_state __select50 __sigprocmask14 __sigsuspend14 __sigtimedwait50 __uselibcstub __wait450 _clock_nanosleep _close _fcntl _fdatasync _fsync _fsync_range _mq_receive _mq_send _msgrcv _msgsnd _open _openat _poll _pread _pthread_attr_get_np _pthread_cond_has_waiters_np _pthread_mutex_held_np _pthread_mutex_owner_np _pthread_rwlock_held_np _pthread_rwlock_rdheld_np _pthread_rwlock_wrheld_np _pwrite _read _readv _recvfrom _recvmmsg _recvmsg _sendmmsg _sendmsg _sendto _sigwait _write _writev accept accept4 call_once clock_nanosleep close cnd_broadcast cnd_destroy cnd_init cnd_signal cnd_timedwait cnd_wait connect fcntl fdatasync fsync fsync_range mq_receive mq_send msgrcv msgsnd mtx_destroy mtx_init mtx_lock mtx_timedlock mtx_trylock mtx_unlock open openat poll pread pthread__allqueue pthread__alltree_lock pthread__cancel_stub_binder pthread__cleanup_pop pthread__cleanup_push pthread__concurrency pthread__dbg pthread__deadqueue pthread__deadqueue_lock pthread__errno pthread__guardsize pthread__init pthread__lock_ops pthread__nspins pthread__pagesize pthread__sched_yield pthread__stacksize pthread__started pthread__static_lib_binder pthread__tsd_destructors pthread__tsd_list pthread__unpark_max pthread_attr_destroy pthread_attr_get_np pthread_attr_getdetachstate pthread_attr_getguardsize pthread_attr_getinheritsched pthread_attr_getname_np pthread_attr_getschedparam pthread_attr_getschedpolicy pthread_attr_getscope pthread_attr_getstack pthread_attr_getstackaddr pthread_attr_getstacksize pthread_attr_init pthread_attr_setcreatesuspend_np pthread_attr_setdetachstate pthread_attr_setguardsize pthread_attr_setinheritsched pthread_attr_setname_np pthread_attr_setschedparam pthread_attr_setschedpolicy pthread_attr_setscope pthread_attr_setstack pthread_attr_setstackaddr pthread_attr_setstacksize pthread_barrier_destroy pthread_barrier_init pthread_barrier_wait pthread_barrierattr_destroy pthread_barrierattr_init pthread_cancel pthread_cond_broadcast pthread_cond_destroy pthread_cond_has_waiters_np pthread_cond_init pthread_cond_signal pthread_cond_timedwait pthread_cond_wait pthread_condattr_destroy pthread_condattr_getclock pthread_condattr_init pthread_condattr_setclock pthread_create pthread_curcpu_np pthread_detach pthread_equal pthread_exit pthread_getaffinity_np pthread_getattr_np pthread_getcpuclockid pthread_getname_np pthread_getschedparam pthread_getspecific pthread_join pthread_key_create pthread_key_delete pthread_keys_max pthread_kill pthread_main_np pthread_mutex_destroy pthread_mutex_getprioceiling pthread_mutex_held_np pthread_mutex_init pthread_mutex_lock pthread_mutex_owner_np pthread_mutex_setprioceiling pthread_mutex_timedlock pthread_mutex_trylock pthread_mutex_unlock pthread_mutexattr_destroy pthread_mutexattr_getprioceiling pthread_mutexattr_getprotocol pthread_mutexattr_gettype pthread_mutexattr_init pthread_mutexattr_setprioceiling pthread_mutexattr_setprotocol pthread_mutexattr_settype pthread_once pthread_resume_np pthread_rwlock_destroy pthread_rwlock_held_np pthread_rwlock_init pthread_rwlock_rdheld_np pthread_rwlock_rdlock pthread_rwlock_timedrdlock pthread_rwlock_timedwrlock pthread_rwlock_tryrdlock pthread_rwlock_trywrlock pthread_rwlock_unlock pthread_rwlock_wrheld_np pthread_rwlock_wrlock pthread_rwlockattr_destroy pthread_rwlockattr_init pthread_self pthread_setaffinity_np pthread_setcancelstate pthread_setcanceltype pthread_setcontext pthread_setname_np pthread_setschedparam pthread_setschedprio pthread_setspecific pthread_sigmask pthread_spin_destroy pthread_spin_init pthread_spin_lock pthread_spin_trylock pthread_spin_unlock pthread_suspend_np pthread_testcancel pwrite read readv recvfrom recvmmsg recvmsg sem_close sem_destroy sem_getvalue sem_init sem_open sem_post sem_timedwait sem_trywait sem_unlink sem_wait sendmmsg sendmsg sendto setcontext sigwait tcdrain thrd_create thrd_current thrd_detach thrd_equal thrd_exit thrd_join thrd_sleep thrd_yield tss_create tss_delete tss_get tss_set write writev @ 1.5 log @revert previous; needs more discussion/testing. @ text @d203 1 @ 1.4 log @Make pthread_setname_np variadic for compatibility with FreeBSD and GLIBC. Bump. @ text @a51 1 __pthread_setname_np120 @ 1.3 log @libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread @ text @d52 1 @ 1.2 log @libpthread(3): Add missing cancellation points. - accept4 - tcdrain XXX Should our nonstandard alias paccept(2) also be a cancellation point? PR lib/59240: POSIX.1-2024: cancellation point audit @ text @d26 3 d31 1 d37 1 @ 1.2.2.1 log @Pull up following revision(s) (requested by riz in ticket #90): games/factor/Makefile: revision 1.17 etc/mtree/NetBSD.dist.tests: revision 1.211 usr.sbin/plainrsa-gen/Makefile: revision 1.8 tests/lib/libpthread/weak/t_pthread_weak_threaded.c: revision 1.1 lib/libc/shlib_version: revision 1.300 tests/lib/libpthread/weak/test/Makefile: file removal libexec/httpd/Makefile: revision 1.37 usr.bin/nbsvtool/Makefile: revision 1.5 usr.bin/moduli/Makefile.inc: revision 1.4 distrib/sets/lists/tests/shl.mi: revision 1.17 external/bsd/nsd/Makefile.inc: revision 1.11 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.1 tests/lib/libpthread/weak/test/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile: revision 1.2 lib/libpthread/pthread.c: revision 1.188 crypto/external/apache2/openssl/dist/crypto/thread/api.c: revision 1.2 usr.sbin/syslogd/Makefile: revision 1.39 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: file removal lib/libpthread/pthread_mi.expsym: revision 1.3 distrib/sets/lists/base/shl.mi: revision 1.1015 crypto/external/apache2/openssl/lib/libssl/thread.inc: revision 1.2 usr.bin/dc/Makefile: revision 1.7 tests/usr.bin/cc/Makefile: revision 1.10 tests/crypto/libcrypto/Makefile: revision 1.18 tests/lib/libpthread/weak/t_pthread_weak_nothread.c: revision 1.1 lib/libpthread/pthread_attr.c: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/thread.inc: revision 1.2 external/bsd/wpa/bin/wpa_passphrase/Makefile: revision 1.8 external/bsd/tcpdump/bin/Makefile: revision 1.29 external/bsd/ppp/usr.sbin/pppd/Makefile: revision 1.6 lib/libpthread/pthread.h: revision 1.42 crypto/external/bsd/heimdal/Makefile.inc: revision 1.14 tests/lib/libpthread/weak/test/t_pthread_weak_nothread.c: revision 1.1 distrib/sets/lists/debug/shl.mi: revision 1.373 usr.bin/ftp/Makefile: revision 1.44 crypto/external/bsd/netpgp/bin/Makefile.inc: revision 1.2 distrib/sets/lists/tests/mi: revision 1.1395 external/bsd/pam-u2f/bin/pamu2fcfg/Makefile: revision 1.8 distrib/sets/lists/tests/mi: revision 1.1396 distrib/sets/lists/debug/shl.mi: revision 1.376 tests/lib/libpthread/Makefile: revision 1.20 tests/lib/libc/hash/Makefile: revision 1.6 tests/crypto/libcrypto/dh/Makefile: revision 1.4 tests/lib/libpthread/Makefile: revision 1.21 tests/lib/libpthread/weak/lib/Makefile: revision 1.1 tests/lib/libpthread/weak/Makefile.inc: revision 1.1 tests/lib/libpthread/Makefile: revision 1.22 crypto/external/apache2/openssl/lib/libcrypto/Makefile: revision 1.3 external/bsd/libfido2/bin/Makefile.inc: revision 1.5 lib/libc/include/reentrant.h: revision 1.24 tests/lib/libpthread/weak/lib/h_pthread_weak.h: revision 1.1 tests/lib/libpthread/weak/lib/h_pthread_weak.c: revision 1.1 share/mk/bsd.prog.mk: revision 1.357 tests/crypto/libcrypto/Makefile.inc: revision 1.14 lib/libpthread/shlib_version: revision 1.21 external/bsd/wpa/bin/hostapd/Makefile: revision 1.21 external/bsd/ntp/Makefile.inc: revision 1.26 crypto/external/bsd/heimdal/bin/hxtool/Makefile: revision 1.8 external/bsd/wpa/bin/wpa_supplicant/Makefile: revision 1.14 distrib/sets/lists/debug/mi: revision 1.487 crypto/external/apache2/openssl/bin/Makefile: revision 1.2 lib/libc/thread-stub/thread-stub.c: revision 1.34 tests/usr.bin/cc/t_pthread_abuse.sh: revision 1.1 tests/lib/libpthread/weak/test/t_pthread_weak_threaded.c: file removal crypto/external/bsd/openssh/bin/Makefile.inc: revision 1.8 libpthread: Test pthread_create link errors without -(l)pthread. Prompted by: PR lib/59685: libcrypto should not depend on libpthread libc: Expose some more pthread stubs. Additionally, provide the option for pthread.h to expose pthread_create so that libc can provide a weak stub for it, if you define _NETBSD_PTHREAD_CREATE_WEAK. This allows libraries to use the functions without linking against libpthread for applications that don't need threads. For example, with OpenSSL's libcrypto, as long as you don't try to raise OSSL_set_max_threads above 0, it won't ever try pthread_create. New pthread.h macros defined: pthread_attr_destroy __libc_thr_attr_destroy pthread_attr_init __libc_thr_attr_init pthread_attr_setdetachstate __libc_thr_attr_setdetachstate pthread_detach __libc_thr_detach pthread_join __libc_thr_join New pthread.h macros defined if _NETBSD_PTHREAD_CREATE_WEAK is defined first: pthread_create __libc_thr_create New symbols defined by libc as weak aliases for stubs that always fail but can be overridden by libpthread: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that libc already defined __libc_thr_create. New internal stubs, not for overriding: __libc_thr_detach_stub __libc_thr_join_stub These were formerly called __libc_pthread_detach and __libc_pthread_join, respectively, and libc has defined weak aliases pthread_detach and pthread_join for them since 2013. I retained all four of those symbols, but defined new ones in the __ namespace that match the pattern for other thread stubs to avoid raising questions about why the pattern seems to be broken. I left a comment noting this fact too. New pthread strong aliases to override the libc symbols: __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate __libc_thr_detach __libc_thr_join Note that pthread already defined a strong __libc_thr_create alias for the real pthread_create, so there is no need to add a new one. PR lib/59685: libcrypto should not depend on libpthread libpthread: Test pthread stubs in threaded vs non-threaded programs. PR lib/59685: libcrypto should not depend on libpthread libpthread: append to SUBDIR instead of overwrite it Noticed and from <riastradh>, thanks! PR lib/59685: libcrypto should not depend on libpthread tests/lib/libpthread: Fix tests in subdirectory. Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live. PR lib/59685: libcrypto should not depend on libpthread openssl: Stop dragging libpthread into every libcrypto user. With the new _NETBSD_PTHREAD_CREATE_WEAK, libcrypto can have a call to pthread_create without linking against libpthread, so it is not necessary to link all libcrypto users against libpthread too. Applications that link against libcrypto but not libpthread can't use threaded OpenSSL functionality, of course -- OSSL_set_max_threads will always fail in such applications. This reverts all the makefile churn that I found for unnecessary libpthread linkage since the openssl 3.5 import. PR lib/59685: libcrypto should not depend on libpthread libc, libpthread: Bump for pthread stub additions. New symbols were added a couple weeks ago but I forgot to bump the shlib minors. PR lib/59685: libcrypto should not depend on libpthread @ text @a25 3 __libc_thr_attr_destroy __libc_thr_attr_init __libc_thr_attr_setdetachstate a27 1 __libc_thr_detach a32 1 __libc_thr_join @ 1.2.4.1 log @file pthread_mi.expsym was added on branch perseant-exfatfs on 2025-08-02 05:54:55 +0000 @ text @d1 284 @ 1.2.4.2 log @Sync with HEAD @ text @a0 284 ___msync13 ___nanosleep50 __aio_suspend50 __kevent100 __libc_cond_broadcast __libc_cond_destroy __libc_cond_init __libc_cond_signal __libc_cond_timedwait __libc_cond_wait __libc_mutex_destroy __libc_mutex_init __libc_mutex_lock __libc_mutex_trylock __libc_mutex_unlock __libc_mutexattr_destroy __libc_mutexattr_init __libc_mutexattr_settype __libc_rwlock_destroy __libc_rwlock_init __libc_rwlock_rdlock __libc_rwlock_tryrdlock __libc_rwlock_trywrlock __libc_rwlock_unlock __libc_rwlock_wrlock __libc_thr_create __libc_thr_curcpu __libc_thr_equal __libc_thr_errno __libc_thr_exit __libc_thr_getspecific __libc_thr_init __libc_thr_keycreate __libc_thr_keydelete __libc_thr_once __libc_thr_self __libc_thr_setcancelstate __libc_thr_setspecific __libc_thr_sigsetmask __libc_thr_yield __mq_timedreceive50 __mq_timedsend50 __msync13 __nanosleep50 __pollts50 __pselect50 __res_get_state __res_put_state __res_state __select50 __sigprocmask14 __sigsuspend14 __sigtimedwait50 __uselibcstub __wait450 _clock_nanosleep _close _fcntl _fdatasync _fsync _fsync_range _mq_receive _mq_send _msgrcv _msgsnd _open _openat _poll _pread _pthread_attr_get_np _pthread_cond_has_waiters_np _pthread_mutex_held_np _pthread_mutex_owner_np _pthread_rwlock_held_np _pthread_rwlock_rdheld_np _pthread_rwlock_wrheld_np _pwrite _read _readv _recvfrom _recvmmsg _recvmsg _sendmmsg _sendmsg _sendto _sigwait _write _writev accept accept4 call_once clock_nanosleep close cnd_broadcast cnd_destroy cnd_init cnd_signal cnd_timedwait cnd_wait connect fcntl fdatasync fsync fsync_range mq_receive mq_send msgrcv msgsnd mtx_destroy mtx_init mtx_lock mtx_timedlock mtx_trylock mtx_unlock open openat poll pread pthread__allqueue pthread__alltree_lock pthread__cancel_stub_binder pthread__cleanup_pop pthread__cleanup_push pthread__concurrency pthread__dbg pthread__deadqueue pthread__deadqueue_lock pthread__errno pthread__guardsize pthread__init pthread__lock_ops pthread__nspins pthread__pagesize pthread__sched_yield pthread__stacksize pthread__started pthread__static_lib_binder pthread__tsd_destructors pthread__tsd_list pthread__unpark_max pthread_attr_destroy pthread_attr_get_np pthread_attr_getdetachstate pthread_attr_getguardsize pthread_attr_getinheritsched pthread_attr_getname_np pthread_attr_getschedparam pthread_attr_getschedpolicy pthread_attr_getscope pthread_attr_getstack pthread_attr_getstackaddr pthread_attr_getstacksize pthread_attr_init pthread_attr_setcreatesuspend_np pthread_attr_setdetachstate pthread_attr_setguardsize pthread_attr_setinheritsched pthread_attr_setname_np pthread_attr_setschedparam pthread_attr_setschedpolicy pthread_attr_setscope pthread_attr_setstack pthread_attr_setstackaddr pthread_attr_setstacksize pthread_barrier_destroy pthread_barrier_init pthread_barrier_wait pthread_barrierattr_destroy pthread_barrierattr_init pthread_cancel pthread_cond_broadcast pthread_cond_destroy pthread_cond_has_waiters_np pthread_cond_init pthread_cond_signal pthread_cond_timedwait pthread_cond_wait pthread_condattr_destroy pthread_condattr_getclock pthread_condattr_init pthread_condattr_setclock pthread_create pthread_curcpu_np pthread_detach pthread_equal pthread_exit pthread_getaffinity_np pthread_getattr_np pthread_getcpuclockid pthread_getname_np pthread_getschedparam pthread_getspecific pthread_join pthread_key_create pthread_key_delete pthread_keys_max pthread_kill pthread_mutex_destroy pthread_mutex_getprioceiling pthread_mutex_held_np pthread_mutex_init pthread_mutex_lock pthread_mutex_owner_np pthread_mutex_setprioceiling pthread_mutex_timedlock pthread_mutex_trylock pthread_mutex_unlock pthread_mutexattr_destroy pthread_mutexattr_getprioceiling pthread_mutexattr_getprotocol pthread_mutexattr_gettype pthread_mutexattr_init pthread_mutexattr_setprioceiling pthread_mutexattr_setprotocol pthread_mutexattr_settype pthread_once pthread_resume_np pthread_rwlock_destroy pthread_rwlock_held_np pthread_rwlock_init pthread_rwlock_rdheld_np pthread_rwlock_rdlock pthread_rwlock_timedrdlock pthread_rwlock_timedwrlock pthread_rwlock_tryrdlock pthread_rwlock_trywrlock pthread_rwlock_unlock pthread_rwlock_wrheld_np pthread_rwlock_wrlock pthread_rwlockattr_destroy pthread_rwlockattr_init pthread_self pthread_setaffinity_np pthread_setcancelstate pthread_setcanceltype pthread_setcontext pthread_setname_np pthread_setschedparam pthread_setschedprio pthread_setspecific pthread_sigmask pthread_spin_destroy pthread_spin_init pthread_spin_lock pthread_spin_trylock pthread_spin_unlock pthread_suspend_np pthread_testcancel pwrite read readv recvfrom recvmmsg recvmsg sem_close sem_destroy sem_getvalue sem_init sem_open sem_post sem_timedwait sem_trywait sem_unlink sem_wait sendmmsg sendmsg sendto setcontext sigwait tcdrain thrd_create thrd_current thrd_detach thrd_equal thrd_exit thrd_join thrd_sleep thrd_yield tss_create tss_delete tss_get tss_set write writev @ 1.1 log @libpthread: Fix expected symbols on alpha and hppa. These have PTHREAD__ASM_RASOPS and define a different subset of symbols which get exported. None of these pthread__ras_* and pthread__lock_* symbols _should_ be exported but we can fix that in a future revbump. PR lib/58838: shared libraries in base should all have expsym lists @ text @d90 1 d270 1 @