1 // ----------------------------------------------------------------------
2 // Copyright (C) 2005 Universidad de Cantabria, SPAIN
4 // FRSH/MaRTE OS web page: http://marte.unican.es/frsh
5 // Contact Addresses: Julio Luis Medina Pasaje medinajl@unican.es
6 // Michael González Harbour mgh@unican.es
8 // FRSH/MaRTE OS is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2, or (at your option)
13 // FRSH/MaRTE OS is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // distributed with MaRTE OS; see file COPYING. If not, write to the
20 // Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 // As a special exception, if you link this unit with other files to
24 // produce an executable, this unit does not by itself cause the
25 // resulting executable to be covered by the GNU General Public License.
26 // This exception does not however invalidate any other reasons why the
27 // executable file might be covered by the GNU Public License.
29 // -----------------------------------------------------------------------
30 // prototypes for functions used in frsh_scheduler.c
31 // which implement the sporadic server functionality
35 //3 roundrobin background scheduling: jan 2005
40 #include "frsh_types.h"
42 //3 Round robin background functions
45 frsh_to_background(frsh_sched_data_t *frsh,
47 posix_appsched_actions_t *actions,
48 frsh_server_id_t is_a_fresh_thread,
49 frsh_server_id_t is_a_generic_bind);
52 frsh_to_foreground(frsh_sched_data_t *frsh,
53 frsh_server_data_t *server,
54 frsh_thread_data_t *the_thread);
57 frsh_rr_schedule_next(frsh_sched_data_t *frsh,
58 posix_appsched_actions_t *actions);
62 //launch a new job in a server that is waiting in a synchronization object,
63 //it is called in response to the frsh_signal_synchobject function and also
64 //in response to the frsh_destroy_synchobject function, when the synch_object
65 //to destroy has servers waiting.
67 frsh_signal_server(frsh_sched_data_t *frsh,
70 // This function performs an activation of the sporadic server
72 frsh_ss_activation ( frsh_sched_data_t *frsh,
73 frsh_server_data_t *server,
75 posix_appsched_actions_t *actions);
79 frsh_reply_data(frsh_server_data_t *server,
80 frsh_out_msg_t *reply);
82 // This function is called when a new job is to be activated
84 frsh_new_job ( frsh_sched_data_t *frsh,
85 frsh_server_data_t *server,
87 posix_appsched_actions_t *actions,
88 frsh_out_msg_t *reply);
90 //annotate a replenishment operation in the list
92 frsh_schedule_replenishment(frsh_server_data_t *server, int kind);
94 //do replenish the sporadic server
96 frsh_ss_replenish (frsh_sched_data_t *frsh,
97 frsh_server_data_t *server,
99 posix_appsched_actions_t *actions,
100 frsh_out_msg_t *reply);
102 #endif // _FRSH_SS_H_