Skip to content

Instantly share code, notes, and snippets.

@joycemaferko
Created August 18, 2021 13:17
Show Gist options
  • Save joycemaferko/36c5f7a52fc41e67fe0daab678f666b5 to your computer and use it in GitHub Desktop.
Save joycemaferko/36c5f7a52fc41e67fe0daab678f666b5 to your computer and use it in GitHub Desktop.
Pthread Prototypes
/* Prototypes for the following new *clock methods added to Newlib
* libc/include/pthread.h */
#if __GNU_VISIBLE
/* The Issue 8 standard adds pthread_mutex_clocklock() */
int pthread_mutex_clocklock(pthread_mutex_t *__restrict, clockid_t,
const struct timespec *__restrict);
#endif /* __GNU_VISIBLE */
#if __GNU_VISIBLE
/* The Issue 8 standard adds pthread_cond_clockwait() */
int pthread_cond_clockwait(pthread_cond_t *__restrict,
pthread_mutex_t *__restrict, clockid_t,
const struct timespec *__restrict);
#endif /* __GNU_VISIBLE */
#if __GNU_VISIBLE
/* The Issue 8 standard adds pthread_rwlock_clockrdlock()
* and pthread_rwlock_clockwrlock()*/
int pthread_rwlock_clockrdlock(pthread_rwlock_t *__restrict, clockid_t,
const struct timespec *__restrict);
int pthread_rwlock_clockwrlock(pthread_rwlock_t *__restrict, clockid_t,
const struct timespec *__restrict);
#endif /* __GNU_VISIBLE */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment