X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fgeekos%2Fsynch.h;h=b1ad875e2b46400e6bf57c9c4145b567dc9ae366;hb=9b71972f414ad18f88ca429d75b44e9b5a5041db;hp=5cb95ef3fd846061293c67bb44131c50a3af2e0c;hpb=734dfbecdb21f61f344ca092b99a957b58e49e52;p=palacios.releases.git diff --git a/palacios/include/geekos/synch.h b/palacios/include/geekos/synch.h index 5cb95ef..b1ad875 100644 --- a/palacios/include/geekos/synch.h +++ b/palacios/include/geekos/synch.h @@ -18,9 +18,9 @@ enum { MUTEX_UNLOCKED, MUTEX_LOCKED }; struct Mutex { - int state; - struct Kernel_Thread* owner; - struct Thread_Queue waitQueue; + int state; + struct Kernel_Thread* owner; + struct Thread_Queue waitQueue; }; #define MUTEX_INITIALIZER { MUTEX_UNLOCKED, 0, THREAD_QUEUE_INITIALIZER } @@ -35,6 +35,7 @@ void Mutex_Unlock(struct Mutex* mutex); void Cond_Init(struct Condition* cond); void Cond_Wait(struct Condition* cond, struct Mutex* mutex); +int Cond_Wait_Timeout(struct Condition * cond, struct Mutex * mutex, uint_t ms); void Cond_Signal(struct Condition* cond); void Cond_Broadcast(struct Condition* cond);