typedef struct {
frescan_budget_t budget;
- struct timespec period;
+ struct timespec period;
+} frescan_budget_period_t;
+
+typedef struct {
+ frescan_budget_period_t values;
frescan_prio_t prio;
} frescan_server_params_t;
*/
typedef struct {
- frescan_budget_t max_budget;
- struct timespec min_period;
- frescan_budget_t min_budget;
- struct timespec max_period;
+ frescan_budget_period_t min_values;
+ frescan_budget_period_t max_values;
frescan_prio_t prio;
} frescan_contract_t;
* synchronization is done using a semaphore. This is because the queues
* are accesed concurrently from user threads and the IRQ handler.
*
+ * @net: the network this priority queue belongs to (mainly for locking)
* @fifo_queues: an array of packets for each priority where each packet
* is just the head of a fifo_list. The array is allocated
* from the heap, using malloc, at initialization with range
*/
typedef struct {
+ frescan_network_t net;
frescan_packet_t *fifo_queues;
uint32_t max_prio;
sem_t sem;
* @local_node: the local node id for that network. The implementation does not
* support several interfaces for the same network.
* @fd: file descriptor associated to /dev/canXX
+ * @repl_thread_id: replenishment thread id
+ * @manager_thread_id: manager thread id
+ * @acceptor_thread_id: acceptor thread id
+ * @neg_messages_ss_id: sporadic server for negotiation messages
* @queues: the queues of this network instance
* @last_packet: pointer to the last packet from which a frame was inserted
* in the chip and its transmission is not complete.
frescan_node_t local_node;
int fd;
fosa_thread_id_t repl_thread_id;
- fosa_thread_id_t neg_thread_id;
+ fosa_thread_id_t manager_thread_id;
+ fosa_thread_id_t acceptor_thread_id;
+ frescan_ss_t neg_messages_ss_id;
frescan_queues_t queues;
frescan_packet_t *last_packet;
frescan_prio_t last_packet_prio;