2 * @file frescan_servers_replenishments.h
4 * @brief the replenishment data and thread for the servers
15 * This module contains the thread that waits for server's replenishment
16 * timer signals and perform the necessary replenishments.
20 * See MaRTE OS license
24 #ifndef _MARTE_FRESCAN_SERVERS_REPLENISHMENTS_H_
25 #define _MARTE_FRESCAN_SERVERS_REPLENISHMENTS_H_
28 #include "frescan.h" // frescan_network_t
29 #include "frescan_data.h"
32 * frescan_replenishments_init - init the replenishment structures and thread
34 * @net: the network instance
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
40 * NOTE: it must be called from the MAIN because it sets the signal mask
43 extern int frescan_replenishments_init(frescan_network_t net);
45 extern frescan_repl_op_t *frescan_repl_op_alloc();
47 extern int frescan_repl_op_free(frescan_repl_op_t *repl_op);
50 * frescan_replenishment_program - set a replenishment operation
52 * @net: the network instance
56 extern int frescan_replenishment_program(frescan_network_t net,
58 const struct timespec *timestamp);
60 #endif // _MARTE_FRESCAN_SERVERS_REPLENISHMENTS_H_