History log of /openbsd-current/lib/libc/hidden/signal.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.15 12-Jan-2019 jca

Move sigwait(3) from libpthread to libc

POSIX wants it in libc, that's where the function can be found on other
systems. Reported by naddy@, input from naddy@ and guenther@.
"looks ok" guenther@, ok deraadt@

Note: riding the libc/libpthread major cranks earlier today.


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.14 26-Sep-2016 guenther

sigsetmask() and sigblock() are no longer used by any setjmp implementation
so the internal hidden names are unused; switch to PROTO_DEPRECATED()
and drop the DEF_WEAK()s


# 1.13 06-Sep-2016 guenther

Make sure attributes are applied to function declarations before they're
used or defined, as clang isn't as forgiving as gcc. Also, declare
__flt_rounds() so that libc can build it despire clang providing its own
<float.h>

ok stefan@ kettenis@


Revision tags: OPENBSD_6_0_BASE
# 1.12 09-May-2016 guenther

Remove sigreturn declaration and the now-unused libc syscall stub


# 1.11 07-May-2016 guenther

Use a Thread Information Block in both single and multi-threaded programs.
This stores errno, the cancelation flags, and related bits for each thread
and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable!

Make libpthread dlopen'able by moving the cancelation wrappers into libc
and doing locking and fork/errno handling via callbacks that libpthread
registers when it first initializes. 'errno' *must* be declared via
<errno.h> now!

Clean up libpthread's symbol exports like libc.

On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec.

Testing by various, particularly sthen@ and patrick@
ok kettenis@


Revision tags: OPENBSD_5_9_BASE
# 1.10 10-Nov-2015 guenther

Split the intra-thread functionality from kill(2) into its own syscall
thrkill(2), rolling the kill(2) syscall number with the ABI change to
avoid breaking binaries during during the transition. thrkill(2) includes
a 'tcb' argument that eliminates the need for locking in pthread_kill()
and simplifies pthread_cancel(). Switch __stack_smash_handler() to use
thrkill(2) and explicitly unblock SIGABRT.

Minor bump to both libc and libpthread: make sure you install a new kernel!

ok semarie@


# 1.9 25-Oct-2015 guenther

Use sigaction() instead of signal() to avoid pulling in unnecessary
wrappers. To keep uses from crawling back in, mark signal() as
deprecated inside libc.

ok deraadt@


# 1.8 23-Oct-2015 guenther

Merge the sigaction() and sigprocmask() overloads/wrappers from libpthread
into libc, and move pthread_sigmask() as well (just a trivial wrapper).
This provides consistent handling of SIGTHR between single- and multi-threaded
programs and is a step in the merge of all the libpthread overloads, providing
some ASM and Makefile bits that the other wrappers will need.

ok deraadt@ millert@


# 1.7 19-Sep-2015 guenther

Don't wrap initialized variables: binutils appears to be mishandling them
on arm and m88k

problems with optind observed by jsg@


# 1.6 13-Sep-2015 guenther

Do provide hidden _libc_* aliases for sig{block,setmask} and use them in
the ASM *setjmp implementations.
Skip the PLT when calling them on amd64 (other archs to do this after testing)

ok miod@


# 1.5 12-Sep-2015 guenther

Finish wrapping <signal.h> so that calls to the sigset ops go direct and
everything but raise() and signal() are weak.
No longer need _thread_sys_ prefix on getthrid()


# 1.4 11-Sep-2015 guenther

Add PROTO_WRAP() for (almost) all the syscalls that libpthread doesn't
override so that internal calls go direct

ok deraadt@


# 1.3 10-Sep-2015 guenther

Pull in namespace.h when building all .c files using gcc's -include option,
so that we can provide asm labels for the memcpy/memset/__stack_smash_handler
calls that it generates ab initio. Eliminate direct #includes of it. Make
sure it's a dependency of all objects (unnecessary for asm, but close enough).

ok deraadt@


# 1.2 09-Sep-2015 guenther

Hide __sigintr and __strsignal as internal implementation details.
Delete the already hidden _signal alias too.

ok deraadt@ millert@


# 1.1 06-Sep-2015 guenther

Fix aliasing of sys_errlist, sys_nerr, sys_siglist, and sys_signame
to eliminate duplicate copies of the tables and get direct access internally

ok kettenis@ deraadt@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.14 26-Sep-2016 guenther

sigsetmask() and sigblock() are no longer used by any setjmp implementation
so the internal hidden names are unused; switch to PROTO_DEPRECATED()
and drop the DEF_WEAK()s


# 1.13 06-Sep-2016 guenther

Make sure attributes are applied to function declarations before they're
used or defined, as clang isn't as forgiving as gcc. Also, declare
__flt_rounds() so that libc can build it despire clang providing its own
<float.h>

ok stefan@ kettenis@


Revision tags: OPENBSD_6_0_BASE
# 1.12 09-May-2016 guenther

Remove sigreturn declaration and the now-unused libc syscall stub


# 1.11 07-May-2016 guenther

Use a Thread Information Block in both single and multi-threaded programs.
This stores errno, the cancelation flags, and related bits for each thread
and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable!

Make libpthread dlopen'able by moving the cancelation wrappers into libc
and doing locking and fork/errno handling via callbacks that libpthread
registers when it first initializes. 'errno' *must* be declared via
<errno.h> now!

Clean up libpthread's symbol exports like libc.

On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec.

Testing by various, particularly sthen@ and patrick@
ok kettenis@


Revision tags: OPENBSD_5_9_BASE
# 1.10 10-Nov-2015 guenther

Split the intra-thread functionality from kill(2) into its own syscall
thrkill(2), rolling the kill(2) syscall number with the ABI change to
avoid breaking binaries during during the transition. thrkill(2) includes
a 'tcb' argument that eliminates the need for locking in pthread_kill()
and simplifies pthread_cancel(). Switch __stack_smash_handler() to use
thrkill(2) and explicitly unblock SIGABRT.

Minor bump to both libc and libpthread: make sure you install a new kernel!

ok semarie@


# 1.9 25-Oct-2015 guenther

Use sigaction() instead of signal() to avoid pulling in unnecessary
wrappers. To keep uses from crawling back in, mark signal() as
deprecated inside libc.

ok deraadt@


# 1.8 23-Oct-2015 guenther

Merge the sigaction() and sigprocmask() overloads/wrappers from libpthread
into libc, and move pthread_sigmask() as well (just a trivial wrapper).
This provides consistent handling of SIGTHR between single- and multi-threaded
programs and is a step in the merge of all the libpthread overloads, providing
some ASM and Makefile bits that the other wrappers will need.

ok deraadt@ millert@


# 1.7 19-Sep-2015 guenther

Don't wrap initialized variables: binutils appears to be mishandling them
on arm and m88k

problems with optind observed by jsg@


# 1.6 13-Sep-2015 guenther

Do provide hidden _libc_* aliases for sig{block,setmask} and use them in
the ASM *setjmp implementations.
Skip the PLT when calling them on amd64 (other archs to do this after testing)

ok miod@


# 1.5 12-Sep-2015 guenther

Finish wrapping <signal.h> so that calls to the sigset ops go direct and
everything but raise() and signal() are weak.
No longer need _thread_sys_ prefix on getthrid()


# 1.4 11-Sep-2015 guenther

Add PROTO_WRAP() for (almost) all the syscalls that libpthread doesn't
override so that internal calls go direct

ok deraadt@


# 1.3 10-Sep-2015 guenther

Pull in namespace.h when building all .c files using gcc's -include option,
so that we can provide asm labels for the memcpy/memset/__stack_smash_handler
calls that it generates ab initio. Eliminate direct #includes of it. Make
sure it's a dependency of all objects (unnecessary for asm, but close enough).

ok deraadt@


# 1.2 09-Sep-2015 guenther

Hide __sigintr and __strsignal as internal implementation details.
Delete the already hidden _signal alias too.

ok deraadt@ millert@


# 1.1 06-Sep-2015 guenther

Fix aliasing of sys_errlist, sys_nerr, sys_siglist, and sys_signame
to eliminate duplicate copies of the tables and get direct access internally

ok kettenis@ deraadt@