Steve Simon <[email protected]> once said:
> The difference comes from the fact that sleep is deep inside its
> stack/errlab hierarchy when it receives a note. This causes it
> to jump to the notify function (still in the users context),
> the notify function then calls back into the kernel (noted()).
> 
> this is where it gets weird, as on entry to the kernel syscall() zeros
> up->nerrlab and so throws away the processes error history. Then if noted()
> wants to continue the user process I would expect sleep to get resumed
> and to recurr out of its stack and hit several poperror()s and end up with
> a negative nerrlab!
> 
> so how does it work in the ntoe case?

I think it goes something like this.

syssleep
  --> tsleep
    --> sleep
            when awakened, checks notepending and calls
                error with Eintr ("interrupted"), then jumps
                back to the error-branch of waserror in syscall
                --> syscall
                    sets errstr, calls notify, etc.

alarmkproc
  --> postnote
      sets notepending and wakes the sleeping proc

I'm quite tired, so I may have missed a step.

  Anthony

Reply via email to