diff options
author | unknown <konstantin@mysql.com> | 2005-07-14 19:42:56 +0400 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2005-07-14 19:42:56 +0400 |
commit | e4f2bd469fffe87aa18dd93c221cc424a4da82f6 (patch) | |
tree | e160ac8703afc6d52b39d0579b2f10fedbef7bd2 /mysys/my_os2cond.c | |
parent | 20d8170adc735d49acc95981845ebd0844c00653 (diff) | |
download | mariadb-git-e4f2bd469fffe87aa18dd93c221cc424a4da82f6.tar.gz |
Get rid of checking for ETIME return value of pthread_cond_timedwait.
ETIME was returned by cond_timedwait (sic, the pre-POSIX1001b function) on
Solaris 2.6 and 2.7. pthread_cond_timedwait on Solaris returns ETIMEDOUT.
The standard requirement is that the only additional return value
of pthred_cond_timedwait compared to pthread_cond_wait is ETIMEDOUT.
Let us not bloat the application code with redundant checks,
and if we're ever to work on a platform that returns a non-standard
value, we should write a wrapper for that platform (like we do, e.g., for
Windows).
mysys/my_os2cond.c:
- fix our implementation of pthread_cond_timedwait on OS2 to return
ETIMEDOUT instead of ETIME.
sql/item_func.cc:
- don't check for ETIME
sql/slave.cc:
- don't check for ETIME
sql/sql_insert.cc:
- don't check for ETIME
Diffstat (limited to 'mysys/my_os2cond.c')
-rw-r--r-- | mysys/my_os2cond.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysys/my_os2cond.c b/mysys/my_os2cond.c index e23afb89e66..83a03d62046 100644 --- a/mysys/my_os2cond.c +++ b/mysys/my_os2cond.c @@ -100,7 +100,7 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, rc = DosWaitEventSem(cond->semaphore, timeout); if (rc != 0) - rval = ETIME; + rval= ETIMEDOUT; if (mutex) pthread_mutex_lock(mutex); |