this evening I spent a bit of time doing , trying to hook up the IRQ system to the UART driver in userspace, so it can read the data received when it arrives. it's nice to do some low-level work after a couple of months of high-level programming!

Follow

this whole process is quite complicated because the kernel can't allocate during IRQs. so we preallocate a ring buffer per UART, and fill it up as data comes in, then deblock the driver process. implementing the buffers so they can be written from one thread and read from another is quite tricky!

· · Web · 1 · 0 · 0

the UART driver seems to work! I can receive stuff, send it to another process, then echo it back over the UART 🎉

Sign in to participate in the conversation
Vachtnoes

Mastodon is a server for a federated social network: everyone can run a server if they want to, including me. So this is a Mastodon server for me (Vierkantor) and my friends.