From e7dc501ee5254083feaee97a93d4a47b04b93553 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 8 Sep 2010 14:40:51 -0400 Subject: [PATCH] Implement EVBASE_NEED_NOTIFY on win32 --- evthread-internal.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/evthread-internal.h b/evthread-internal.h index c6a8787e..b7946f66 100644 --- a/evthread-internal.h +++ b/evthread-internal.h @@ -189,6 +189,10 @@ int _evthreadimpl_cond_wait(void *cond, void *lock, const struct timeval *tv); #define EVTHREAD_GET_ID() _evthreadimpl_get_id() #define EVBASE_IN_THREAD(base) \ ((base)->th_owner_id == _evthreadimpl_get_id()) +#define EVBASE_NEED_NOTIFY(base) \ + ((base)->running_loop && \ + ((base)->th_owner_id != _evthreadimpl_get_id())) + #define EVTHREAD_ALLOC_LOCK(lockvar, locktype) \ ((lockvar) = _evthreadimpl_lock_alloc(locktype))