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 * -----------------------------------------------------------------------
21 * Copyright (C) 2006 - 2008 FRESCOR consortium partners:
23 * Universidad de Cantabria, SPAIN
24 * University of York, UK
25 * Scuola Superiore Sant'Anna, ITALY
26 * Kaiserslautern University, GERMANY
27 * Univ. Politécnica Valencia, SPAIN
28 * Czech Technical University in Prague, CZECH REPUBLIC
30 * Thales Communication S.A. FRANCE
31 * Visual Tools S.A. SPAIN
32 * Rapita Systems Ltd UK
35 * See http://www.frescor.org for a link to partners' websites
37 * FRESCOR project (FP6/2005/IST/5-034026) is funded
38 * in part by the European Union Sixth Framework Programme
39 * The European Union is not liable of any use that may be
42 * This file is part of FRESCAN
44 * FRESCAN is free software; you can redistribute it and/or modify
45 * it under the terms of the GNU General Public License as published by
46 * the Free Software Foundation; either version 2, or (at your option)
49 * FRESCAN is distributed in the hope that it will be useful, but
50 * WITHOUT ANY WARRANTY; without even the implied warranty of
51 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
52 * General Public License for more details.
54 * You should have received a copy of the GNU General Public License
55 * distributed with FRESCAN; see file COPYING. If not, write to the
56 * Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
59 * As a special exception, including FRESCAN header files in a file,
60 * instantiating FRESCAN generics or templates, or linking other files
61 * with FRESCAN objects to produce an executable application, does not
62 * by itself cause the resulting executable application to be covered
63 * by the GNU General Public License. This exception does not
64 * however invalidate any other reasons why the executable file might be
65 * covered by the GNU Public License.
66 * -----------------------------------------------------------------------
70 #ifndef _MARTE_FRESCAN_SERVERS_REPLENISHMENTS_H_
71 #define _MARTE_FRESCAN_SERVERS_REPLENISHMENTS_H_
74 #include "frescan.h" // frescan_network_t
75 #include "frescan_data.h"
78 * frescan_replenishments_init - init the replenishment structures and thread
80 * @net: the network instance
82 * Initialize the repl_op pool, set the mask for the timer signals and create
83 * the thread that will await for those signals and replenish the appropiate
86 * NOTE: it must be called from the MAIN because it sets the signal mask
89 extern int frescan_replenishments_init(frescan_network_t net);
91 extern frescan_repl_op_t *frescan_repl_op_alloc();
93 extern int frescan_repl_op_free(frescan_repl_op_t *repl_op);
96 * frescan_replenishment_program - set a replenishment operation
98 * @net: the network instance
102 extern int frescan_replenishment_program(frescan_network_t net,
104 const struct timespec *timestamp);
106 #endif // _MARTE_FRESCAN_SERVERS_REPLENISHMENTS_H_