Re: FS automount: callback when FS is mounted

2022-01-26 Thread Petro Karashchenko
Hello Gregory, I made some progress with this activity. Will appreciate your review https://github.com/apache/incubator-nuttx/pull/5345 Best regards, Petro чт, 2 груд. 2021 р. о 01:42 Gregory Nutt пише: > > > But ai think that the approach with a signal will require turning > automount > > into

RE: FS automount: callback when FS is mounted

2021-12-01 Thread Gregory Nutt
> But ai think that the approach with a signal will require turning automount into a complete file based driver with open/close/ioctl support. Yes, it would have to support a minimal character driver interfaces, one for each monitored volume. The are several characters drivers that just do IOCT

Re: FS automount: callback when FS is mounted

2021-12-01 Thread Petro Karashchenko
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 pointi

Re: FS automount: callback when FS is mounted

2021-12-01 Thread Petro Karashchenko
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 wrote: > > Yeah, I used a wrong term when was asking about "

Re: FS automount: callback when FS is mounted

2021-12-01 Thread Gregory Nutt
> 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

Re: FS automount: callback when FS is mounted

2021-12-01 Thread Petro Karashchenko
Hi Greg, 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. Thank you for replying with an example. I will examine it. Best regards, Petro On Wed, Dec 1, 2021, 8:43 PM Gregory Nutt wro

Re: FS automount: callback when FS is mounted

2021-12-01 Thread Gregory Nutt
I have a question regarding FS automount functionality. Is there a way to get a callback when file system is mounted and ready to be accessed? Or the only way is to implement a polling loop like: while ( access( "/mnt/sdcard0", F_OK ) != 0 ) {   sleep(1); } No, there will never never be ca

FS automount: callback when FS is mounted

2021-12-01 Thread Petro Karashchenko
Hello, I have a question regarding FS automount functionality. Is there a way to get a callback when file system is mounted and ready to be accessed? Or the only way is to implement a polling loop like: while ( access( "/mnt/sdcard0", F_OK ) != 0 ) {   sleep(1); } Best regards, Petro