From 4abab5ad6c8465a7528ccdd5f49367da05f78bbd Mon Sep 17 00:00:00 2001 From: Vladimir Azarov Date: Tue, 1 Oct 2024 15:47:05 +0200 Subject: Initial version --- src/thread/mtx_unlock.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/thread/mtx_unlock.c (limited to 'src/thread/mtx_unlock.c') diff --git a/src/thread/mtx_unlock.c b/src/thread/mtx_unlock.c new file mode 100644 index 0000000..2e5c8cf --- /dev/null +++ b/src/thread/mtx_unlock.c @@ -0,0 +1,10 @@ +#include +#include + +int mtx_unlock(mtx_t *mtx) +{ + /* The only cases where pthread_mutex_unlock can return an + * error are undefined behavior for C11 mtx_unlock, so we can + * assume it does not return an error and simply tail call. */ + return __pthread_mutex_unlock((pthread_mutex_t *)mtx); +} -- cgit v1.2.3