Deferred work mechanisms in Haiku


The Linux kernel supports several mechanisms for delaying work (namely softirqs, tasklets and workqueues). I was wondering if there are any similar mechanisms in Haiku. The documentation doesn’t give any info and googling doesn’t either.

By looking for timers on the code I ended up looking at some accelerator’s code and it seems that they do any periodic work directly on the interrupt handler.

Thank you!

Haiku kernel have DPC queue support: haiku/headers/private/kernel/DPC.h at master · haiku/haiku · GitHub. It allow to run some callback in separate worker thread. 3 DPC queues created by default: normal, urgent and realtime (realtime means no preemption is used for worker thread). You can create your own DPC queue if needed.

1 Like

Yes, this will likely do the job. Thank you!