Skip to content

Commit

Permalink
backport libuv arm64 patch:
Browse files Browse the repository at this point in the history
unix: check Android support for pthread_cond_timedwait_monotonic_np

See: joyent/libuv@3e75042
  • Loading branch information
madafoo committed Jul 24, 2015
1 parent 2fc0853 commit 849772b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node_build/dependencies/libuv/src/unix/thread.c
Expand Up @@ -280,7 +280,7 @@ int uv_cond_init(uv_cond_t* cond) {
if (err)
return -err;

#if !defined(__ANDROID__)
#if !(defined(__ANDROID__) && defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC))
err = pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
if (err)
goto error2;
Expand Down Expand Up @@ -338,7 +338,7 @@ int uv_cond_timedwait(uv_cond_t* cond, uv_mutex_t* mutex, uint64_t timeout) {
timeout += uv__hrtime(UV_CLOCK_PRECISE);
ts.tv_sec = timeout / NANOSEC;
ts.tv_nsec = timeout % NANOSEC;
#if defined(__ANDROID__)
#if defined(__ANDROID__) && defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC)
/*
* The bionic pthread implementation doesn't support CLOCK_MONOTONIC,
* but has this alternative function instead.
Expand Down

0 comments on commit 849772b

Please sign in to comment.