JeeH

Interrupts

Interrupts can be very useful: as the name says, they signal when something has happened while you’re busy doing something else. In embedded systems they can tell you when a a timer expires, when a pin level changes, and when an I/O operation completes. Which happens to be exactly how JeeH uses them.

Sync mode drivers

As described in the previous article, JeeH’s “tasks” implement a limited form of concurrency. This includes “async” drivers to deal with interrupts. But asynchronous I/O requests are somewhat inconvenient: once such a request has been started, you need to return from the task to process completion events (to guarantee atomicity, incoming events for a task can only be picked up when that task is not running).

Multitasking

JeeH supports a limited form of multitasking. There is only a single stack: there are no threads to suspend or resume, but also no need to allocate separate stacks to each one. This single stack expands downwards with the rest of unused RAM available for heap allocation. Just as in any single-tasking bare-metal application.