]> rtime.felk.cvut.cz Git - frescor/fna.git/blob - src_frescan/frescan_servers_replenishments.h
michael found an error in the definition of the posix sporadic servers so i replaced...
[frescor/fna.git] / src_frescan / frescan_servers_replenishments.h
1 /*!
2  * @file frescan_servers_replenishments.h
3  *
4  * @brief the replenishment data and thread for the servers
5  *
6  * @version 0.01
7  *
8  * @date 12-Mar-2008
9  *
10  * @author
11  *      Daniel Sangorrin
12  *
13  * @comments
14  *
15  * This module contains the thread that waits for server's replenishment
16  * timer signals and perform the necessary replenishments.
17  *
18  * @license
19  *
20  * See MaRTE OS license
21  *
22  */
23
24 #ifndef _MARTE_FRESCAN_SERVERS_REPLENISHMENTS_H_
25 #define _MARTE_FRESCAN_SERVERS_REPLENISHMENTS_H_
26
27 #include <time.h>
28 #include "frescan.h" // frescan_network_t
29 #include "frescan_data.h"
30
31 /**
32  * frescan_replenishments_init - init the replenishment structures and thread
33  *
34  * @net: the network instance
35  *
36  * Initialize the repl_op pool, set the mask for the timer signals and create
37  * the thread that will await for those signals and replenish the appropiate
38  * sporadic server.
39  *
40  * NOTE: it must be called from the MAIN because it sets the signal mask
41  */
42
43 extern int frescan_replenishments_init(frescan_network_t net);
44
45 extern frescan_repl_op_t *frescan_repl_op_alloc();
46
47 extern int frescan_repl_op_free(frescan_repl_op_t *repl_op);
48
49 /**
50  * frescan_replenishment_program - set a replenishment operation
51  *
52  * @net: the network instance
53  * @ss: the server
54  */
55
56 extern int frescan_replenishment_program(frescan_network_t net,
57                                          frescan_ss_t ss,
58                                          const struct timespec *timestamp);
59
60 #endif // _MARTE_FRESCAN_SERVERS_REPLENISHMENTS_H_