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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux