aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstddjb
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb')
-rw-r--r--src/libstddjb/pthread_mutex_tailock.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/libstddjb/pthread_mutex_tailock.c b/src/libstddjb/pthread_mutex_tailock.c
deleted file mode 100644
index 8f8fbf3..0000000
--- a/src/libstddjb/pthread_mutex_tailock.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* ISC license. */
-
-#include <errno.h>
-#include <time.h>
-#include <pthread.h>
-
-#include <skalibs/sysdeps.h>
-#include <skalibs/tai.h>
-#include <skalibs/pthread.h>
-
-int pthread_mutex_tailock (pthread_mutex_t *mtx, tain const *deadline, tain *stamp)
-{
- int e ;
- struct timespec ts ;
- tain tto ;
- if (!stamp) return pthread_mutex_lock(mtx) ;
- tain_sub(&tto, deadline, stamp) ;
- if (!timespec_from_tain_relative(&ts, &tto)) return errno ;
-#ifdef SKALIBS_HASPTHREADMUTEXCLOCKLOCK
- if (&tain_now != &tain_wallclock_read)
- e = pthread_mutex_clocklock(mtx, CLOCK_MONOTONIC, &ts) ;
- else
-#else
- e = pthread_mutex_timedlock(mtx, &ts) ;
-#endif
- tain_now(stamp) ;
- return e ;
-}