1 /* Copyright (c) 2006-2015. The SimGrid Team.
2 * All rights reserved. */
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. */
8 #include "src/msg/msg_private.h"
9 #include "src/simix/smx_synchro_private.h"
11 #include "simgrid/s4u/Mutex.hpp"
18 simcall_mutex_lock(mutex_);
23 simcall_mutex_unlock(mutex_);
26 bool Mutex::try_lock()
28 return simcall_mutex_trylock(mutex_);
31 MutexPtr Mutex::createMutex()
33 smx_mutex_t mutex = simcall_mutex_init();
34 return MutexPtr(&mutex->mutex(), false);