How to implement waiting until processing is done by a device..

ckim at ckim at
Fri Aug 20 09:09:23 EDT 2021


We are developing a compute accelerator and I'm not sure which is the best
or normal way to implement the waiting method for the application until the
computing is finished by the accelerator.

The application first sets up input data and configuration for the
accelerator on the memory. It then calls an ioctl which sets up the
registers and it calls another ioctl which trigger the accelerator.

My idea is : 

*	The application process goes into wait queue after calling the
second ioctl by telling the OS "keep me in the wait queue and wake me up
when 'this' signal comes'. 
*	The driver's ISR process sends a signal to the sleeping user process
when processing the 'computing complete' interrupt.

Does this make sense? (Can I define and use a signal for this purpose?) 

And if it does, what function calls should I use? I would appreciate sending
me any link for suggested reading.

It should be possible to use accelerator for multiple processes at the same
time, but I think for now we can just do with single application.


Chan Kim


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Kernelnewbies mailing list