Changeset: f8170070186b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/f8170070186b Modified Files: clients/examples/C/testcondvar.c gdk/gdk_system.c Branch: default Log Message:
Minor changes to get condition variables to compile on Windows. diffs (24 lines): diff --git a/clients/examples/C/testcondvar.c b/clients/examples/C/testcondvar.c --- a/clients/examples/C/testcondvar.c +++ b/clients/examples/C/testcondvar.c @@ -18,7 +18,7 @@ volatile int timeout = 100; // set this /* global state protected by a lock: */ -MT_Lock lock = MT_LOCK_INITIALIZER(the_lock); +MT_Lock lock = MT_LOCK_INITIALIZER(lock); MT_Cond condvar = MT_COND_INITIALIZER(the_condvar); struct state { MT_Id id; diff --git a/gdk/gdk_system.c b/gdk/gdk_system.c --- a/gdk/gdk_system.c +++ b/gdk/gdk_system.c @@ -1164,7 +1164,7 @@ MT_cond_wait(MT_Cond *cond, MT_Lock *loc { MT_thread_setcondwait(cond); #if !defined(HAVE_PTHREAD_H) && defined(WIN32) - SleepConditionVariableCS(&cond->cv, &lock->lock); + SleepConditionVariableCS(&cond->cv, &lock->lock, INFINITE); #else pthread_cond_wait(&cond->cv, &lock->lock); #endif _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org