A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some new files of the cxx version of the MSG API
[simgrid.git]
/
src
/
xbt
/
xbt_rl_synchro.c
diff --git
a/src/xbt/xbt_rl_synchro.c
b/src/xbt/xbt_rl_synchro.c
index
ad230a7
..
d7d8a4d
100644
(file)
--- a/
src/xbt/xbt_rl_synchro.c
+++ b/
src/xbt/xbt_rl_synchro.c
@@
-93,14
+93,20
@@
xbt_mutex_t xbt_mutex_init(void) {
return res;
}
return res;
}
-void xbt_mutex_
lock
(xbt_mutex_t mutex) {
- DEBUG1("
Lock
mutex %p", mutex);
- xbt_os_mutex_
lock
( (xbt_os_mutex_t)mutex );
+void xbt_mutex_
acquire
(xbt_mutex_t mutex) {
+ DEBUG1("
Acquire
mutex %p", mutex);
+ xbt_os_mutex_
acquire
( (xbt_os_mutex_t)mutex );
}
}
-void xbt_mutex_unlock(xbt_mutex_t mutex) {
+void xbt_mutex_timedacquire(xbt_mutex_t mutex, double delay)
+{
+ DEBUG2("Acquire mutex %p with delay %lf", mutex,delay);
+ xbt_os_mutex_timedacquire( (xbt_os_mutex_t)mutex,delay );
+}
+
+void xbt_mutex_release(xbt_mutex_t mutex) {
DEBUG1("Unlock mutex %p", mutex);
DEBUG1("Unlock mutex %p", mutex);
- xbt_os_mutex_
unlock
( (xbt_os_mutex_t)mutex );
+ xbt_os_mutex_
release
( (xbt_os_mutex_t)mutex );
}
void xbt_mutex_destroy(xbt_mutex_t mutex) {
}
void xbt_mutex_destroy(xbt_mutex_t mutex) {
@@
-132,7
+138,7
@@
typedef struct xbt_cond_ {
xbt_cond_t xbt_cond_init(void) {
xbt_cond_t res = (xbt_cond_t) xbt_os_cond_init();
DEBUG1("Create cond %p", res);
xbt_cond_t xbt_cond_init(void) {
xbt_cond_t res = (xbt_cond_t) xbt_os_cond_init();
DEBUG1("Create cond %p", res);
- return
(xbt_cond_t) xbt_os_cond_init()
;
+ return
res
;
}
void xbt_cond_wait(xbt_cond_t cond, xbt_mutex_t mutex) {
}
void xbt_cond_wait(xbt_cond_t cond, xbt_mutex_t mutex) {