Add support for pthread_condattr_get/setclock()

* Allows use of either CLOCK_REALTIME or CLOCK_MONOTONIC as the time
  base for pthread_cond_timedwait().
This commit is contained in:
Hamish Morrison
2015-05-02 20:55:57 +01:00
parent 59c0f3b6f9
commit 10b4fed24f
5 changed files with 56 additions and 3 deletions
+4
View File
@@ -131,6 +131,10 @@ extern int pthread_condattr_getpshared(const pthread_condattr_t *condAttr,
int *processShared);
extern int pthread_condattr_setpshared(pthread_condattr_t *condAttr,
int processShared);
extern int pthread_condattr_getclock(const pthread_condattr_t *condAttr,
clockid_t *clockID);
extern int pthread_condattr_setclock(pthread_condattr_t *condAttr,
clockid_t clockID);
/* rwlock functions */
extern int pthread_rwlock_init(pthread_rwlock_t *lock,
@@ -29,6 +29,7 @@ struct thread_creation_attributes;
typedef struct _pthread_condattr {
bool process_shared;
clockid_t clock_id;
} pthread_condattr;
typedef struct _pthread_mutexattr {