Fixed critical busy waiting #33

Merged
AndreFerreira5 merged 1 commit from 2-sensor-reader into main 2024-02-11 02:31:16 +00:00
AndreFerreira5 commented 2024-02-11 02:31:12 +00:00 (Migrated from github.com)

Whenever there was no writer on the sensor FIFO the sensor reader started busy waiting because the read() call would become non-blocking and it would just process the remains of the buffer without end. By opening the FIFO as O_RDWR, the sensor reader is a reader and a writer simultaneously, preventing the non-blocking call.

Whenever there was no writer on the sensor FIFO the sensor reader started busy waiting because the read() call would become non-blocking and it would just process the remains of the buffer without end. By opening the FIFO as O_RDWR, the sensor reader is a reader and a writer simultaneously, preventing the non-blocking call.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AndreFerreira5/iot-system-sim!33
No description provided.