Skip to content
Snippets Groups Projects
Commit db44e10f authored by Stefan Ghenescu's avatar Stefan Ghenescu
Browse files

comments list of timestamps

parent e6b4bbd3
No related branches found
No related tags found
No related merge requests found
Pipeline #92330 passed
......@@ -23,7 +23,7 @@ int ring_buffer_init(so_ring_buffer_t *ring, size_t cap)
pthread_cond_init(&ring->full_cond, NULL);
pthread_cond_init(&ring->empty_cond, NULL);
// initializare lista simplu inlantuita
// initializare lista de timestamp-uri
init_list();
return 0;
......@@ -124,6 +124,8 @@ void add_to_list(unsigned long timestamp)
new_node->timestamp = timestamp;
new_node->next = NULL;
// cum pachetele sunt create de producer in ordine crescatoare
// a timestamp-urilor, adaug in lista la final, acestea fiind deja sortate
if (list.head == NULL) {
list.head = new_node;
list.tail = new_node;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment