1 /* Copyright (c) 2019-2020. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #ifndef INCLUDE_SIMGRID_MUTEX_H_
7 #define INCLUDE_SIMGRID_MUTEX_H_
9 #include <simgrid/forward.h>
13 XBT_PUBLIC sg_mutex_t sg_mutex_init();
14 XBT_PUBLIC void sg_mutex_lock(sg_mutex_t mutex);
15 XBT_PUBLIC void sg_mutex_unlock(sg_mutex_t mutex);
16 XBT_PUBLIC int sg_mutex_try_lock(sg_mutex_t mutex);
17 XBT_PUBLIC void sg_mutex_destroy(const_sg_mutex_t mutex);
21 #endif /* INCLUDE_SIMGRID_MUTEX_H_ */