Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines with new year.
[simgrid.git] / include / simgrid / semaphore.h
1 /* Public interface to the Link datatype                                    */
2
3 /* Copyright (c) 2018-2019. The SimGrid Team. All rights reserved.          */
4
5 /* This program is free software; you can redistribute it and/or modify it
6  * under the terms of the license (GNU LGPL) which comes with this package. */
7
8 #ifndef INCLUDE_SIMGRID_SEMAPHORE_H_
9 #define INCLUDE_SIMGRID_SEMAPHORE_H_
10
11 #include <simgrid/forward.h>
12
13 /* C interface */
14 SG_BEGIN_DECL()
15 XBT_PUBLIC sg_sem_t sg_sem_init(int initial_value);
16 XBT_PUBLIC void sg_sem_acquire(sg_sem_t sem);
17 XBT_PUBLIC int sg_sem_acquire_timeout(sg_sem_t sem, double timeout);
18 XBT_PUBLIC void sg_sem_release(sg_sem_t sem);
19 XBT_PUBLIC int sg_sem_get_capacity(sg_sem_t sem);
20 XBT_PUBLIC void sg_sem_destroy(sg_sem_t sem);
21 XBT_PUBLIC int sg_sem_would_block(sg_sem_t sem);
22
23 SG_END_DECL()
24
25 #endif /* INCLUDE_SIMGRID_SEMAPHORE_H_ */