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
Warning fix: remove old and weird __foo__ function that generated a warning on clang...
[simgrid.git]
/
src
/
xbt
/
xbt_sg_synchro.c
diff --git
a/src/xbt/xbt_sg_synchro.c
b/src/xbt/xbt_sg_synchro.c
index
724755b
..
927d139
100644
(file)
--- a/
src/xbt/xbt_sg_synchro.c
+++ b/
src/xbt/xbt_sg_synchro.c
@@
-3,7
+3,7
@@
/* This is the simulation implementation, using simix. */
/* This is the simulation implementation, using simix. */
-/* Copyright (c) 2007-201
4
. The SimGrid Team.
+/* Copyright (c) 2007-201
5
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-62,7
+62,7
@@
xbt_thread_t xbt_thread_create(const char *name, void_f_pvoid_t code,
res->code = code;
res->father_data = SIMIX_process_self_get_data(SIMIX_process_self());
/* char*name = bprintf("%s#%p",SIMIX_process_self_get_name(), param); */
res->code = code;
res->father_data = SIMIX_process_self_get_data(SIMIX_process_self());
/* char*name = bprintf("%s#%p",SIMIX_process_self_get_name(), param); */
-
simcall_process_create(&res->s_process,
name,
+
res->s_process = simcall_process_create(
name,
xbt_thread_create_wrapper, res,
SIMIX_host_self_get_name(), -1.0, 0, NULL,
/*props */ NULL,0);
xbt_thread_create_wrapper, res,
SIMIX_host_self_get_name(), -1.0, 0, NULL,
/*props */ NULL,0);
@@
-140,6
+140,11
@@
void xbt_mutex_acquire(xbt_mutex_t mutex)
simcall_mutex_lock((smx_mutex_t) mutex);
}
simcall_mutex_lock((smx_mutex_t) mutex);
}
+int xbt_mutex_try_acquire(xbt_mutex_t mutex)
+{
+ return simcall_mutex_trylock((smx_mutex_t) mutex);
+}
+
void xbt_mutex_release(xbt_mutex_t mutex)
{
simcall_mutex_unlock((smx_mutex_t) mutex);
void xbt_mutex_release(xbt_mutex_t mutex)
{
simcall_mutex_unlock((smx_mutex_t) mutex);