]> rtime.felk.cvut.cz Git - frescor/fna.git/blobdiff - src_frescan/frescan_queues.c
changes to use the FRSH FSA module to do the analysis and spare capacity. TODO: finis...
[frescor/fna.git] / src_frescan / frescan_queues.c
index b20b0675d29dd65f4ee49839b29af41e19d295b1..2206cd6594b8fe101a062cb4a9c1582d5ddd4e76 100644 (file)
@@ -89,7 +89,7 @@ static inline frescan_prio_queue_t *frescan_pqueue_create(uint32_t max_prio,
 
         pq = (frescan_prio_queue_t *)malloc(sizeof(frescan_prio_queue_t));
         if (pq == NULL) {
-                ERROR("could not allocate memory for prio queue\n");
+                FRESCAN_ERROR("could not allocate memory for prio queue\n");
                 return NULL;
         }
 
@@ -98,7 +98,7 @@ static inline frescan_prio_queue_t *frescan_pqueue_create(uint32_t max_prio,
 
         ret = sem_init (&pq->sem, 0, 0);
         if (ret != 0) {
-                ERROR("could not init the semaphore\n");
+                FRESCAN_ERROR("could not init the semaphore\n");
                 free(pq);
                 return NULL;
         }
@@ -133,7 +133,7 @@ int frescan_queues_init(frescan_queues_t *queues,
                                                     params->net);
 
         if (queues->tx_fp_queue == NULL)  {
-                ERROR("could not allocate memory for tx fp queue\n");
+                FRESCAN_ERROR("could not allocate memory for tx fp queue\n");
                 return -1;
         }
 
@@ -143,7 +143,8 @@ int frescan_queues_init(frescan_queues_t *queues,
                        sizeof(frescan_prio_queue_t *));
 
         if (queues->rx_channel_queues == NULL) {
-                ERROR("could not allocate memory for receiving channels\n");
+                FRESCAN_ERROR
+                        ("could not allocate memory for receiving channels\n");
                 return -1;
         }
 
@@ -162,7 +163,8 @@ int frescan_queues_init(frescan_queues_t *queues,
                                                        (max_prio, params->net);
 
                 if (queues->rx_channel_queues[i] == NULL)  {
-                        ERROR("could not allocate memory for rx pq %d\n", i);
+                        FRESCAN_ERROR
+                               ("could not allocate memory for rx pq %d\n", i);
                         return -1;
                 }
         }
@@ -183,7 +185,7 @@ int frescan_pqueue_enqueue(frescan_prio_queue_t *pqueue,
         int ret;
 
         if (prio >= pqueue->max_prio) {
-                ERROR("priority of the packet is too high\n");
+                FRESCAN_ERROR("priority of the packet is too high\n");
                 return -1;
         }
 
@@ -211,7 +213,7 @@ int frescan_pqueue_requeue(frescan_prio_queue_t *pqueue,
         int ret;
 
         if (prio >= pqueue->max_prio) {
-                ERROR("priority of the packet is too high\n");
+                FRESCAN_ERROR("priority of the packet is too high\n");
                 return -1;
         }
 
@@ -407,7 +409,7 @@ int frescan_servers_dequeue(frescan_network_t net,
         server = &the_servers_pool[net][id];
 
         if (list_empty(&server->packet_list.fifo_list)) {
-                ERROR("no packet in server %d fifo list\n", id);
+                FRESCAN_ERROR("no packet in server %d fifo list\n", id);
                 return -1;
         }