TCP: Fixed RTO update and dup ACKs generation.
[haiku.git] / src / libs / compat / freebsd_network / condvar.c
blob79f1062d3ab690a5becc1e363888c4deac1d9de0
1 /*
2 * Copyright 2009 Colin Günther, coling@gmx.de.
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
7 #include <compat/sys/mutex.h>
8 #include <compat/sys/condvar.h>
10 #include "Condvar.h"
13 void cv_init(struct cv* variable, const char* description)
15 conditionInit(variable, description);
19 void cv_signal(struct cv* variable)
21 conditionNotifyOne(variable);
25 int cv_timedwait(struct cv* variable, struct mtx* mutex, int timeout)
27 int status;
29 mtx_unlock(mutex);
30 status = conditionTimedWait(variable, timeout);
31 mtx_lock(mutex);
33 return status;
37 void cv_wait(struct cv* variable, struct mtx* mutex)
39 mtx_unlock(mutex);
40 conditionWait(variable);
41 mtx_lock(mutex);