Cygwin: implement pthread_rwlock_clockrdlock/pthread_rwlock_clockwrlock
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
520c3a3fa2
commit
c2ad78d672
|
@ -1141,6 +1141,8 @@ pthread_mutexattr_setprotocol SIGFE
|
||||||
pthread_mutexattr_setpshared SIGFE
|
pthread_mutexattr_setpshared SIGFE
|
||||||
pthread_mutexattr_settype SIGFE
|
pthread_mutexattr_settype SIGFE
|
||||||
pthread_once SIGFE
|
pthread_once SIGFE
|
||||||
|
pthread_rwlock_clockrdlock SIGFE
|
||||||
|
pthread_rwlock_clockwrlock SIGFE
|
||||||
pthread_rwlock_destroy SIGFE
|
pthread_rwlock_destroy SIGFE
|
||||||
pthread_rwlock_init SIGFE
|
pthread_rwlock_init SIGFE
|
||||||
pthread_rwlock_rdlock SIGFE
|
pthread_rwlock_rdlock SIGFE
|
||||||
|
|
|
@ -199,9 +199,17 @@ int pthread_spin_unlock (pthread_spinlock_t *);
|
||||||
int pthread_rwlock_destroy (pthread_rwlock_t *);
|
int pthread_rwlock_destroy (pthread_rwlock_t *);
|
||||||
int pthread_rwlock_init (pthread_rwlock_t *, const pthread_rwlockattr_t *);
|
int pthread_rwlock_init (pthread_rwlock_t *, const pthread_rwlockattr_t *);
|
||||||
int pthread_rwlock_rdlock (pthread_rwlock_t *);
|
int pthread_rwlock_rdlock (pthread_rwlock_t *);
|
||||||
|
#if __GNU_VISIBLE
|
||||||
|
int pthread_rwlock_clockrdlock (pthread_rwlock_t *, clockid_t,
|
||||||
|
const struct timespec *);
|
||||||
|
#endif
|
||||||
int pthread_rwlock_timedrdlock (pthread_rwlock_t *, const struct timespec *);
|
int pthread_rwlock_timedrdlock (pthread_rwlock_t *, const struct timespec *);
|
||||||
int pthread_rwlock_tryrdlock (pthread_rwlock_t *);
|
int pthread_rwlock_tryrdlock (pthread_rwlock_t *);
|
||||||
int pthread_rwlock_wrlock (pthread_rwlock_t *);
|
int pthread_rwlock_wrlock (pthread_rwlock_t *);
|
||||||
|
#if __GNU_VISIBLE
|
||||||
|
int pthread_rwlock_clockwrlock (pthread_rwlock_t *, clockid_t,
|
||||||
|
const struct timespec *);
|
||||||
|
#endif
|
||||||
int pthread_rwlock_timedwrlock (pthread_rwlock_t *, const struct timespec *);
|
int pthread_rwlock_timedwrlock (pthread_rwlock_t *, const struct timespec *);
|
||||||
int pthread_rwlock_trywrlock (pthread_rwlock_t *);
|
int pthread_rwlock_trywrlock (pthread_rwlock_t *);
|
||||||
int pthread_rwlock_unlock (pthread_rwlock_t *);
|
int pthread_rwlock_unlock (pthread_rwlock_t *);
|
||||||
|
|
|
@ -3174,7 +3174,7 @@ pthread_rwlock_rdlock (pthread_rwlock_t *rwlock)
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" int
|
extern "C" int
|
||||||
pthread_rwlock_timedrdlock (pthread_rwlock_t *rwlock,
|
pthread_rwlock_clockrdlock (pthread_rwlock_t *rwlock, clockid_t clock_id,
|
||||||
const struct timespec *abstime)
|
const struct timespec *abstime)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER timeout;
|
LARGE_INTEGER timeout;
|
||||||
|
@ -3193,7 +3193,7 @@ pthread_rwlock_timedrdlock (pthread_rwlock_t *rwlock,
|
||||||
|
|
||||||
__try
|
__try
|
||||||
{
|
{
|
||||||
int err = pthread_convert_abstime (CLOCK_REALTIME, abstime, &timeout);
|
int err = pthread_convert_abstime (clock_id, abstime, &timeout);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
@ -3204,6 +3204,13 @@ pthread_rwlock_timedrdlock (pthread_rwlock_t *rwlock,
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" int
|
||||||
|
pthread_rwlock_timedrdlock (pthread_rwlock_t *rwlock,
|
||||||
|
const struct timespec *abstime)
|
||||||
|
{
|
||||||
|
return pthread_rwlock_clockrdlock (rwlock, CLOCK_REALTIME, abstime);
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" int
|
extern "C" int
|
||||||
pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock)
|
pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock)
|
||||||
{
|
{
|
||||||
|
@ -3229,7 +3236,7 @@ pthread_rwlock_wrlock (pthread_rwlock_t *rwlock)
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" int
|
extern "C" int
|
||||||
pthread_rwlock_timedwrlock (pthread_rwlock_t *rwlock,
|
pthread_rwlock_clockwrlock (pthread_rwlock_t *rwlock, clockid_t clock_id,
|
||||||
const struct timespec *abstime)
|
const struct timespec *abstime)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER timeout;
|
LARGE_INTEGER timeout;
|
||||||
|
@ -3248,7 +3255,7 @@ pthread_rwlock_timedwrlock (pthread_rwlock_t *rwlock,
|
||||||
|
|
||||||
__try
|
__try
|
||||||
{
|
{
|
||||||
int err = pthread_convert_abstime (CLOCK_REALTIME, abstime, &timeout);
|
int err = pthread_convert_abstime (clock_id, abstime, &timeout);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
@ -3259,6 +3266,13 @@ pthread_rwlock_timedwrlock (pthread_rwlock_t *rwlock,
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" int
|
||||||
|
pthread_rwlock_timedwrlock (pthread_rwlock_t *rwlock,
|
||||||
|
const struct timespec *abstime)
|
||||||
|
{
|
||||||
|
return pthread_rwlock_clockwrlock (rwlock, CLOCK_REALTIME, abstime);
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" int
|
extern "C" int
|
||||||
pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock)
|
pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue