Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
accept single quotes while converting the XML files
[simgrid.git] / src / s4u / s4u_mutex.cpp
1 /* Copyright (c) 2006-2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #include "xbt/log.h"
8 #include "src/msg/msg_private.h"
9 #include "src/simix/smx_network_private.h"
10
11 #include "simgrid/s4u/mutex.hpp"
12
13 namespace simgrid {
14 namespace s4u {
15
16 void Mutex::lock() {
17   simcall_mutex_lock(mutex_);
18 }
19
20 void Mutex::unlock() {
21   simcall_mutex_unlock(mutex_);
22 }
23
24 bool Mutex::try_lock() {
25   return simcall_mutex_trylock(mutex_);
26 }
27
28 }
29 }