diff options
author | Yaakov Selkowitz <yselkowi@redhat.com> | 2011-07-21 13:39:22 +0400 |
---|---|---|
committer | Yaakov Selkowitz <yselkowi@redhat.com> | 2011-07-21 13:39:22 +0400 |
commit | 8a7b0a00df71469999c82fab13a0b76ed3eb68e3 (patch) | |
tree | 93d30d5607a2988ace16bd2dd784bfc314dde49d /winsup/cygwin/include | |
parent | 792c8bcff2d1f9102408f86edb057f158b2b5090 (diff) |
* cygwin.din (pthread_condattr_getclock): Export.
(pthread_condattr_setclock): Export.
* posix.sgml (std-notimpl): Move pthread_condattr_getclock and
pthread_condattr_setclock from here...
(std-susv4): ... to here.
* sysconf.cc (sca): Set _SC_CLOCK_SELECTION to _POSIX_CLOCK_SELECTION.
* thread.cc: (pthread_condattr::pthread_condattr): Initialize clock_id.
(pthread_cond::pthread_cond): Initialize clock_id.
(pthread_cond_timedwait): Use clock_gettime() instead of gettimeofday()
in order to support all allowed clocks.
(pthread_condattr_getclock): New function.
(pthread_condattr_setclock): New function.
* thread.h (class pthread_condattr): Add clock_id member.
(class pthread_cond): Ditto.
* include/pthread.h: Remove obsolete comment.
(pthread_condattr_getclock): Declare.
(pthread_condattr_setclock): Declare.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r-- | winsup/cygwin/include/cygwin/version.h | 3 | ||||
-rw-r--r-- | winsup/cygwin/include/pthread.h | 8 |
2 files changed, 4 insertions, 7 deletions
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index f8e6f1069..9ed8db911 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -417,12 +417,13 @@ details. */ 247: Export error, error_at_line, error_message_count, error_one_per_line, error_print_progname. 248: Export __fpurge. + 249: Export pthread_condattr_getclock, pthread_condattr_setclock. */ /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */ #define CYGWIN_VERSION_API_MAJOR 0 -#define CYGWIN_VERSION_API_MINOR 248 +#define CYGWIN_VERSION_API_MINOR 249 /* There is also a compatibity version number associated with the shared memory regions. It is incremented when incompatible diff --git a/winsup/cygwin/include/pthread.h b/winsup/cygwin/include/pthread.h index 4ed53ab08..8aa734a63 100644 --- a/winsup/cygwin/include/pthread.h +++ b/winsup/cygwin/include/pthread.h @@ -27,12 +27,6 @@ extern "C" /* Defines. (These are correctly defined here as per http://www.opengroup.org/onlinepubs/7908799/xsh/pthread.h.html */ -/* FIXME: this should allocate a new cond variable, and return the value that - would normally be written to the passed parameter of pthread_cond_init(lvalue, NULL); */ -/* #define PTHREAD_COND_INITIALIZER 0 */ - -/* the default : joinable */ - #define PTHREAD_CANCEL_ASYNCHRONOUS 1 /* defaults are enable, deferred */ #define PTHREAD_CANCEL_ENABLE 0 @@ -132,8 +126,10 @@ int pthread_cond_timedwait (pthread_cond_t *, pthread_mutex_t *, const struct timespec *); int pthread_cond_wait (pthread_cond_t *, pthread_mutex_t *); int pthread_condattr_destroy (pthread_condattr_t *); +int pthread_condattr_getclock (const pthread_condattr_t *, clockid_t *); int pthread_condattr_getpshared (const pthread_condattr_t *, int *); int pthread_condattr_init (pthread_condattr_t *); +int pthread_condattr_setclock (pthread_condattr_t *, clockid_t); int pthread_condattr_setpshared (pthread_condattr_t *, int); int pthread_create (pthread_t *, const pthread_attr_t *, |