]> rtime.felk.cvut.cz Git - frescor/fna.git/blob - src_frescan/frescan_bwres_robjs.h
renamings... redo the request and messages part... also now there will be two threads...
[frescor/fna.git] / src_frescan / frescan_bwres_robjs.h
1 /*!
2  * @file frescan_bwres_robjs.h
3  *
4  * @brief FRESCAN bandwith reservation layer: reply objects
5  *
6  * This module contains the definition of the data object and operations to
7  * create a pool of objects, obtain the id of an unused object, wait upon it,
8  * signal it, and finish using it.
9  *
10  * @version 0.01
11  *
12  * @date 1-Apr-2008
13  *
14  * @author Daniel Sangorrin <daniel.sangorrin@unican.es>
15  *
16  */
17
18 #ifndef _FRESCAN_BWRES_ROBJS_H_
19 #define _FRESCAN_BWRES_ROBJS_H_
20
21 #include <time.h> /* for timespec */
22 #include "fosa_opaque_types.h" /* for FOSA_ETIMEDOUT */
23
24 typedef unsigned int frescan_robj_id_t; /* 0 .. MX_REPLY_OBJECTS-1 */
25 #define FRESCAN_ETIMEDOUT FOSA_ETIMEDOUT
26
27 extern int frescan_bwres_robjs_init(int max_ceiling);
28 extern int frescan_bwres_robjs_alloc(frescan_robj_id_t *id, int ceiling);
29 extern int frescan_bwres_robjs_free(frescan_robj_id_t id);
30 extern int frescan_bwres_robjs_signal(frescan_robj_id_t id);
31 extern int frescan_bwres_robjs_wait(frescan_robj_id_t id);
32 extern int frescan_bwres_robjs_timedwait(frescan_robj_id_t id,
33                                          const struct timespec *abstime);
34
35 #endif // _FRESCAN_BWRES_ROBJS_H_