Currently, threads in process_packets.c and execute_packet_callback.c busy wait on the queue, resulting in ~50% CPU usage even when there is no network traffic.
Proposed change:
Replace busy wait polling with a blocking queue implementation that uses:
- Atomic operations (<stdatomic.h>) for lock-free head/tail management
- A POSIX semaphore (sem_t from <semaphore.h>) to block consumer threads efficiently when the queue is empty