1
0
mirror of https://github.com/openbsd/src.git synced 2024-12-21 23:18:00 -08:00
openbsd-src/lib/librthread
cheloha 2e686a7fd2 libc, librthread: _twait: subtraction is not comparison
Compare the current time with the absolute timeout before computing
the relative timeout to avoid arithmetic overflow.  Fixes a bug where
large negative absolute timeouts are subtracted into large positive
relative timeouts and incorrectly cause the caller to block.

While here, use timespeccmp(3) and timespecsub(3) to simplify the
code.

Thread: https://marc.info/?l=openbsd-tech&m=169945962503129&w=2
2024-01-07 19:44:28 +00:00
..
Makefile Instead of opting in to futexes on archs with atomics opt out on archs 2020-02-06 03:13:45 +00:00
namespace.h
pthread_np.h add a pthread_get_name_np to match pthread_set_name_np. 2019-02-04 17:18:08 +00:00
pthread.h Revert recent changes to unbreak ports/net/samba 2017-11-04 22:53:57 +00:00
rthread_attr.c syslog_r() expects a priority, not a faciliy. Use LOG_ERR for the 2018-05-02 14:06:00 +00:00
rthread_barrier_attr.c Update my email address. 2020-04-06 00:01:08 +00:00
rthread_barrier.c Update my email address. 2020-04-06 00:01:08 +00:00
rthread_cb.h Move mutex, condvar, and thread-specific data routes, pthread_once, and 2017-09-05 02:40:54 +00:00
rthread_fork.c Prefer <elf.h> to the non portable <sys/exec_elf.h>. 2017-10-29 08:45:53 +00:00
rthread_getcpuclockid.c
rthread_mutex_prio.c
rthread_mutexattr.c
rthread_np.c Add {get,set}thrname(2) for putting thread names in the kernel and 2023-01-07 05:24:58 +00:00
rthread_rwlock_compat.c librthread: validate timespec inputs with timespecisvalid(3) 2022-05-14 14:52:20 +00:00
rthread_rwlock.c Wake all waiters when unlocking an rwlock. This fixes a hang 2019-03-03 18:39:10 +00:00
rthread_rwlockattr.c
rthread_sched.c Move mutex, condvar, and thread-specific data routes, pthread_once, and 2017-09-05 02:40:54 +00:00
rthread_sem_compat.c librthread: validate timespec inputs with timespecisvalid(3) 2022-05-14 14:52:20 +00:00
rthread_sem.c librthread: validate timespec inputs with timespecisvalid(3) 2022-05-14 14:52:20 +00:00
rthread_spin_lock.c Update my email address. 2020-04-06 00:01:08 +00:00
rthread_stack.c these files do not need sys/param.h 2021-09-17 15:20:21 +00:00
rthread.c spelling fixes; from paul tagliamonte 2022-12-27 17:10:05 +00:00
rthread.h New futex(2) based rwlock implementation based on the mutex code. 2019-02-13 13:22:14 +00:00
sched_prio.c
shlib_version Add syscall stub for kqueue1(2) 2023-08-20 15:17:53 +00:00
Symbols.map add a pthread_get_name_np to match pthread_set_name_np. 2019-02-04 17:18:08 +00:00
synch.h libc, librthread: _twait: subtraction is not comparison 2024-01-07 19:44:28 +00:00