Skip to contentSkip to conversation

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

DISCUSSION [email protected] 1 participant 1 message Aug 20, 2021

lore
Share & tools
lore
#0 lore raw

Hello,

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.

Thanks!

Chan Kim

_______________________________________________
Kernelnewbies mailing list
[email protected]
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies