зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1271590 - Rename timespecadd to moz_timespecadd. r=jandem
NetBSD provides a timespecadd macro in sys/time.h, which conflicts with this one.
This commit is contained in:
Родитель
7ee391a98f
Коммит
39e17aa33c
|
@ -37,7 +37,7 @@ static const clockid_t WhichClock = CLOCK_MONOTONIC;
|
||||||
// timespec structure is largely lacking such conveniences. Thankfully, the
|
// timespec structure is largely lacking such conveniences. Thankfully, the
|
||||||
// utilities available in MFBT make implementing our own quite easy.
|
// utilities available in MFBT make implementing our own quite easy.
|
||||||
static void
|
static void
|
||||||
timespecadd(struct timespec* lhs, struct timespec* rhs, struct timespec* result)
|
moz_timespecadd(struct timespec* lhs, struct timespec* rhs, struct timespec* result)
|
||||||
{
|
{
|
||||||
// Add nanoseconds. This may wrap, but not above 2 billion.
|
// Add nanoseconds. This may wrap, but not above 2 billion.
|
||||||
MOZ_RELEASE_ASSERT(lhs->tv_nsec < NanoSecPerSec);
|
MOZ_RELEASE_ASSERT(lhs->tv_nsec < NanoSecPerSec);
|
||||||
|
@ -149,7 +149,7 @@ js::ConditionVariable::wait_for(UniqueLock<Mutex>& lock,
|
||||||
MOZ_RELEASE_ASSERT(!r);
|
MOZ_RELEASE_ASSERT(!r);
|
||||||
|
|
||||||
struct timespec abs_ts;
|
struct timespec abs_ts;
|
||||||
timespecadd(&now_ts, &rel_ts, &abs_ts);
|
moz_timespecadd(&now_ts, &rel_ts, &abs_ts);
|
||||||
|
|
||||||
r = pthread_cond_timedwait(ptCond, ptMutex, &abs_ts);
|
r = pthread_cond_timedwait(ptCond, ptMutex, &abs_ts);
|
||||||
#else
|
#else
|
||||||
|
|
Загрузка…
Ссылка в новой задаче