"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "locks/unix/thread_cond.c" between
apr-1.6.5.tar.bz2 and apr-1.7.0.tar.bz2

About: APR (Apache Portable Runtime) project offers software libraries that provide a predictable and consistent interface to underlying platform-specific implementations (APR core library).

thread_cond.c  (apr-1.6.5.tar.bz2):thread_cond.c  (apr-1.7.0.tar.bz2)
skipping to change at line 82 skipping to change at line 82
} }
#endif #endif
return rv; return rv;
} }
APR_DECLARE(apr_status_t) apr_thread_cond_timedwait(apr_thread_cond_t *cond, APR_DECLARE(apr_status_t) apr_thread_cond_timedwait(apr_thread_cond_t *cond,
apr_thread_mutex_t *mutex, apr_thread_mutex_t *mutex,
apr_interval_time_t timeout) apr_interval_time_t timeout)
{ {
apr_status_t rv; apr_status_t rv;
apr_time_t then; if (timeout < 0) {
struct timespec abstime; rv = pthread_cond_wait(&cond->cond, &mutex->mutex);
#ifdef HAVE_ZOS_PTHREADS
if (rv) {
rv = errno;
}
#endif
}
else {
apr_time_t then;
struct timespec abstime;
then = apr_time_now() + timeout; then = apr_time_now() + timeout;
abstime.tv_sec = apr_time_sec(then); abstime.tv_sec = apr_time_sec(then);
abstime.tv_nsec = apr_time_usec(then) * 1000; /* nanoseconds */ abstime.tv_nsec = apr_time_usec(then) * 1000; /* nanoseconds */
rv = pthread_cond_timedwait(&cond->cond, &mutex->mutex, &abstime); rv = pthread_cond_timedwait(&cond->cond, &mutex->mutex, &abstime);
#ifdef HAVE_ZOS_PTHREADS #ifdef HAVE_ZOS_PTHREADS
if (rv) { if (rv) {
rv = errno; rv = errno;
} }
#endif #endif
if (ETIMEDOUT == rv) { if (ETIMEDOUT == rv) {
return APR_TIMEUP; return APR_TIMEUP;
}
} }
return rv; return rv;
} }
APR_DECLARE(apr_status_t) apr_thread_cond_signal(apr_thread_cond_t *cond) APR_DECLARE(apr_status_t) apr_thread_cond_signal(apr_thread_cond_t *cond)
{ {
apr_status_t rv; apr_status_t rv;
rv = pthread_cond_signal(&cond->cond); rv = pthread_cond_signal(&cond->cond);
#ifdef HAVE_ZOS_PTHREADS #ifdef HAVE_ZOS_PTHREADS
 End of changes. 5 change blocks. 
11 lines changed or deleted 21 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)