Cygwin: implement pthread_mutex_clocklock
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
123454f9d0
commit
5c4eaf45f1
|
@ -1121,6 +1121,7 @@ pthread_join SIGFE
|
|||
pthread_key_create SIGFE
|
||||
pthread_key_delete SIGFE
|
||||
pthread_kill SIGFE
|
||||
pthread_mutex_clocklock SIGFE
|
||||
pthread_mutex_destroy SIGFE
|
||||
pthread_mutex_getprioceiling SIGFE
|
||||
pthread_mutex_init SIGFE
|
||||
|
|
|
@ -167,6 +167,10 @@ int pthread_mutex_getprioceiling (const pthread_mutex_t *, int *);
|
|||
int pthread_mutex_init (pthread_mutex_t *, const pthread_mutexattr_t *);
|
||||
int pthread_mutex_lock (pthread_mutex_t *);
|
||||
int pthread_mutex_setprioceiling (pthread_mutex_t *, int, int *);
|
||||
#if __GNU_VISIBLE
|
||||
int pthread_mutex_clocklock (pthread_mutex_t *, clockid_t,
|
||||
const struct timespec *);
|
||||
#endif
|
||||
int pthread_mutex_timedlock (pthread_mutex_t *, const struct timespec *);
|
||||
int pthread_mutex_trylock (pthread_mutex_t *);
|
||||
int pthread_mutex_unlock (pthread_mutex_t *);
|
||||
|
|
|
@ -3475,7 +3475,8 @@ pthread_mutex_lock (pthread_mutex_t *mutex)
|
|||
}
|
||||
|
||||
extern "C" int
|
||||
pthread_mutex_timedlock (pthread_mutex_t *mutex, const struct timespec *abstime)
|
||||
pthread_mutex_clocklock (pthread_mutex_t *mutex, clockid_t clock_id,
|
||||
const struct timespec *abstime)
|
||||
{
|
||||
LARGE_INTEGER timeout;
|
||||
|
||||
|
@ -3491,7 +3492,7 @@ pthread_mutex_timedlock (pthread_mutex_t *mutex, const struct timespec *abstime)
|
|||
|
||||
__try
|
||||
{
|
||||
int err = pthread_convert_abstime (CLOCK_REALTIME, abstime, &timeout);
|
||||
int err = pthread_convert_abstime (clock_id, abstime, &timeout);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
@ -3502,6 +3503,12 @@ pthread_mutex_timedlock (pthread_mutex_t *mutex, const struct timespec *abstime)
|
|||
return EINVAL;
|
||||
}
|
||||
|
||||
extern "C" int
|
||||
pthread_mutex_timedlock (pthread_mutex_t *mutex, const struct timespec *abstime)
|
||||
{
|
||||
return pthread_mutex_clocklock (mutex, CLOCK_REALTIME, abstime);
|
||||
}
|
||||
|
||||
extern "C" int
|
||||
pthread_mutex_trylock (pthread_mutex_t *mutex)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue