On Fri, Mar 13, 2020 at 6:12 PM Gregory Nutt <spudan...@gmail.com> wrote:
> On 3/13/2020 4:00 PM, Gregory Nutt wrote:
> > Sounds like it needs to call nxsig_wait_uninterruptible instead of
> > nxsig_wait somewhere in sched/pthread/
>
> s/nxsig_wait/nxsem_wait/g
>
> The calling sequence is:
>
>     libs/libc/phthread:pthread_mutex_lock() ->
>     
> sched/pthread:pthread_mutex_timed:pthread_mutex_timedlock()->pthread_mutex_take()->pthread_semaphore_take()->pthread_sem_take()
>
> The nxsem_wait() is in pthread_sem_take().  But you can't change just
> that, however, other logic might depend on the interruptible nature.  It
> might requires propagating the interruptible characteristic.

If pthread_mutex_timedlock() would call pthread_mutex_take() with a
intr value of false, instead of true as it is doing now, that would
cause pthread_sem_take() to call nxsem_wait_uninterruptible().

But, I am *not* rushing to change this, because I don't know what else
it might affect (and also I'm not 100% sure that my reading of the
code is correct).

In the meantime, I'll continue studying it.

Nathan

Reply via email to