Day15 - Learning Log¶
๐ฏ Topic¶
User-space event loop using poll
๐ What I learned¶
- Difference between blocking and non-blocking I/O
- Why poll is required
- How driver wait queue connects to poll
- Event-driven programming model
๐งช Experiments¶
Blocking read¶
- Used
cat /dev/mygpio - Behavior: blocks until event
Non-blocking read¶
- Used
O_NONBLOCK - Observed busy loop issue
poll()¶
- Efficient event waiting
- No CPU usage when idle
- Correct integration with driver IRQ
๐ก Key Insights¶
- poll does not read data
- read must consume data
- driver and user-space must cooperate
โ ๏ธ Issues¶
(optional)
๐ Next Step¶
- ioctl (control plane)
- multi-device event handling