But ai think that the approach with a signal will require turning automount into a complete file based driver with open/close/ioctl support.
What do you think? Best regards, Petro On Thu, Dec 2, 2021, 12:37 AM Petro Karashchenko < petro.karashche...@gmail.com> wrote: > Yes. Thank you for pointing me out this. > > I was looking into SIGEV_THREAD with a callback posting a semaphore, but > sigtimedwait() seems to be exactly what I'm looking for. > > Best regards, > Petro > > On Thu, Dec 2, 2021, 12:20 AM Gregory Nutt <spudan...@gmail.com> wrote: > >> > Yeah, I used a wrong term when was asking about "callback". Actually I >> need >> >> asynchronous notification, so I can pend a task on some primitive like a >> >> semaphore. >> >> >> >> Semaphore is not a good choice to OS/application signaling due to memory >> access issues in some build configurations. And semapores are not easilty >> shareable in the case of multiple waiters. >> >> >> >> Again, a signal is what you want. Your applications can wait on a signal >> primitive for any mount related event to occur. This is the strategy used >> everywhere and is intended just for what you are doing. >> >