Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
This change the semantic of the timed function. The behavior depends now of the value...
authorcherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 26 Oct 2007 08:56:35 +0000 (08:56 +0000)
committercherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 26 Oct 2007 08:56:35 +0000 (08:56 +0000)
commit66d97e68ea51b5514594e5818f75c7d844586eae
tree625f30eedbdcc8284bec6df47f276812e77ea886
parent29189eaaec0832afd90a05c0672a2c72ccb3cc4e
This change the semantic of the timed function. The behavior depends now of the value of the parameters delay or timeout. If these parameters are negative, the timed function have the behavior of a blocking function. For example the following call : xbt_os_mutex_timedacquire(mutex,-1) is equivalent to xbt_os_mutex_acquire(mutex). If you set these parameters to zero
the timed function have the behavior of a try function. For example, to try to lock a mutex you must call the xbt_os_mutex_timedacquire() function with the parameter delay/timeout set to zero.
Finally, if you specify a delay more than zero, the timed function try to acquire the lock until the delay was expired, which is the normal behavior of the function.

Remark : the changes of the other files are the consequence of this new semantic : because the timed functions also implement the behavior of the try functions, theirs declarations and theirs definitions are removed.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4874 48e7efb5-ca39-0410-a469-dd3cf9ba447f
include/xbt/synchro.h
src/include/xbt/xbt_os_thread.h
src/xbt/xbt_os_thread.c
src/xbt/xbt_rl_synchro.c