1
0
Fork 0
libbluray/src/util
Kamil Rytarowski bc2d0d8c41 mutex: Switch the POSIX backend to PTHREAD_MUTEX_RECURSIVE
The code for recursive mutexes triggered Undefined Behavior
and crash as pthread_equal(3) was not used in a portable way.
On the first call of mutex_lock() pthread_equal() was called with
a pthread_t of value -1 which is invalid.

Passing a non valid thread ID to pthread_equal is undefined.

Switch the backend to native interface for POSIX recursive
mutexes with PTHREAD_MUTEX_RECURSIVE and simplify the code.

Detected on NetBSD/amd64 9.99.46.

Signed-off-by: Marvin Scholz <epirat07@gmail.com>
2020-02-13 16:50:06 +01:00
..
array.c include config.h 2015-05-07 12:12:55 +03:00
array.h array.h: remove incorrect malloc attribute 2018-08-27 09:32:23 +03:00
attributes.h Add BD_USED attribute (unchecked function return value) 2016-08-08 19:45:44 +03:00
bits.c Include config.h 2017-05-12 13:23:13 +03:00
bits.h bits.h: add BD_USED 2016-08-15 13:01:29 +03:00
event_queue.c Split event queue to separate file 2016-03-21 12:22:36 +02:00
event_queue.h Split event queue to separate file 2016-03-21 12:22:36 +02:00
log_control.h Remove extra ; 2015-02-18 11:44:21 +02:00
logging.c Allow writing log to file even if application log handler is used 2017-06-15 01:06:00 +03:00
logging.h Move print_hex to strutl.c 2015-01-04 15:56:20 +02:00
macro.h Fix shift left 2016-05-15 16:48:25 +03:00
mutex.c mutex: Switch the POSIX backend to PTHREAD_MUTEX_RECURSIVE 2020-02-13 16:50:06 +01:00
mutex.h Move code from mutex.h to mutex.c. 2015-02-18 23:16:06 +02:00
refcnt.c include config.h 2015-05-07 12:12:55 +03:00
refcnt.h Missing extern "C" in refcnt.h 2015-08-06 15:16:11 +03:00
strutl.c Cache "known" playlists when playing using on-disc menus 2017-05-12 08:35:33 +03:00
strutl.h Cache "known" playlists when playing using on-disc menus 2017-05-12 08:35:33 +03:00
time.c Move code from time.h to time.c 2015-02-18 22:06:28 +02:00
time.h Move code from time.h to time.c 2015-02-18 22:06:28 +02:00