Skip to content

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