]> rtime.felk.cvut.cz Git - frescor/fna.git/blobdiff - src_frescan/frescan_data.h
updated everything to the new structure... it compiles ok... next step, make sure...
[frescor/fna.git] / src_frescan / frescan_data.h
index 420a626335fec4c2bab73ad2aaa9fc72056105b2..b857d8776d0b140cea8222da0d3743c871e08147 100644 (file)
@@ -63,7 +63,11 @@ typedef struct {
 
 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;
 
@@ -105,10 +109,8 @@ extern frescan_server_data_t the_active_servers[FRESCAN_MX_NETWORKS];
  */
 
 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;
 
@@ -123,6 +125,7 @@ typedef struct {
  * 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
@@ -132,6 +135,7 @@ typedef struct {
  */
 
 typedef struct {
+        frescan_network_t net;
         frescan_packet_t *fifo_queues;
         uint32_t max_prio;
         sem_t sem;
@@ -158,6 +162,10 @@ typedef struct {
  * @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.
@@ -179,7 +187,9 @@ typedef struct {
         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;