freebsd-src/lib/libthr/thread
Dapeng Gao 7cae020b9c Simplify signal handling code in libthr by removing use of SYS_sigreturn
The use of SYS_sigreturn is unnecessary here.

If handle_signal is called when a signal is delivered, it can just
return normally back to sigcode which will call sigreturn anyway.

In case handle_signal is called by check_deferred_signal, using
setcontext is better than SYS_sigreturn because that is the correct
system call to pair with the earlier getcontext.

Reviewed by:	imp, kib
Differential Revision:	https://reviews.freebsd.org/D44893
2024-06-06 15:48:39 -06:00
..
Makefile.inc libthr: add pthread_sigqueue(3) 2024-04-23 19:51:22 +03:00
thr_affinity.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_attr.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_autoinit.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_barrier.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_barrierattr.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_cancel.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_clean.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_concurrency.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_cond.c libthr: restore _pthread_cond_timedwait 2024-03-12 21:03:14 +00:00
thr_condattr.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_create.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_ctrdtr.c lib: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
thr_detach.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_equal.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_event.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_exit.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_fork.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_getcpuclockid.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_getprio.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_getschedparam.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_getthreadid_np.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_info.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_init.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_join.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_kern.c lib: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
thr_kill.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_list.c lib: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
thr_main_np.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_malloc.c lib: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
thr_multi_np.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_mutex.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_mutexattr.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_once.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_printf.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_private.h libthr: avoid varargs in fcntl and openat interposers 2024-05-08 15:49:13 +01:00
thr_pshared.c lib: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
thr_pspinlock.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_resume_np.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_rtld.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_rwlock.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_rwlockattr.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_self.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_sem.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_setprio.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_setschedparam.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_sig.c Simplify signal handling code in libthr by removing use of SYS_sigreturn 2024-06-06 15:48:39 -06:00
thr_sigqueue.c libthr: add pthread_sigqueue(3) 2024-04-23 19:51:22 +03:00
thr_single_np.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_sleepq.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_spec.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_spinlock.c lib: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
thr_stack.c lib: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
thr_suspend_np.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_switch_np.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_symbols.c lib: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
thr_syscalls.c libthr: avoid varargs in fcntl and openat interposers 2024-05-08 15:49:13 +01:00
thr_umtx.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00
thr_umtx.h libthr: move _umtx_op_err() to libsys 2024-02-05 20:34:56 +00:00
thr_yield.c libthr: remove explicit sys/cdefs.h includes 2024-03-06 09:25:13 +02:00