pussuw commented on PR #8740:
URL: https://github.com/apache/nuttx/pull/8740#issuecomment-1465872382

   The sigwait test now works with system calls enabled as well, with 
icicle:pnsh:
   
   spawn_execattrs: Setting policy=2 priority=100 for pid=4
   nxsig_tcbdispatch: TCB=0x8008c500 signo=0 code=0 value=0 mask=00000000
   clock_gettime: clock_id=0
   clock_gettime: Returning tp=(43201225,90000000)
   
   Tclock_gettime: clock_id=0
   clock_gettime: Returning tp=(43201225,100000000)
   est for value 43201225 sec 180000000 nsec
   nxsig_notification: pid=4 signo=14 code=2 sival_ptr=0
   nxsig_tcbdispatch: TCB=0x8008c500 signo=14 code=2 value=0 mask=00004000
   clock_gettime: clock_id=0
   clock_gettime: Returning tp=(43201225,200000000)
   Tclock_gettime: clock_id=0
   clock_gettime: Returning tp=(43201225,200000000)
   imclock_gettime: clock_id=0
   clock_gettime: Returning tp=(43201225,210000000)
   er expired 43201225 sec 200000000 nsec
   Test for value 43201226 sec 200000000 nsec
   nxsig_notification: pid=4 signo=14 code=2 sival_ptr=0
   nxsig_tcbdispatch: TCB=0x8008c500 signo=14 code=2 value=0 mask=00004000
   clock_gettime: clock_id=0
   clock_gettime: Returning tp=(43201226,220000000)
   Tclock_gettime: clock_id=0
   clock_gettime: Returning tp=(43201226,220000000)
   imclock_gettime: clock_id=0
   clock_gettime: Returning tp=(43201226,230000000)
   er expired 43201226 sec 220000000 nsec
   Test for value 43201227 sec 250000000 nsec
   nxsig_notification: pid=4 signo=14 code=2 sival_ptr=0
   nxsig_tcbdispatch: TCB=0x8008c500 signo=14 code=2 value=0 mask=00004000
   clock_gettime: clock_id=0
   clock_gettime: Returning tp=(43201227,270000000)
   Tclock_gettime: clock_id=0
   clock_gettime: Returning tp=(43201227,270000000)
   imclock_gettime: clock_id=0
   clock_gettime: Returning tp=(43201227,280000000)
   er expired 43201227 sec 270000000 nsec
   Test for value 43201229 sec 270000000 nsec
   nxsig_notification: pid=4 signo=14 code=2 sival_ptr=0
   nxsig_tcbdispatch: TCB=0x8008c500 signo=14 code=2 value=0 mask=00004000
   clock_gettime: clock_id=0
   clock_gettime: Returning tp=(43201229,300000000)
   Tclock_gettime: clock_id=0
   clock_gettime: Returning tp=(43201229,300000000)
   imclock_gettime: clock_id=0
   clock_gettime: Returning tp=(43201229,310000000)
   er expired 43201229 sec 300000000 nsec
   Test for value 43201232 sec 300005000 nsec
   nxsig_notification: pid=4 signo=14 code=2 sival_ptr=0
   nxsig_tcbdispatch: TCB=0x8008c500 signo=14 code=2 value=0 mask=00004000
   clock_gettime: clock_id=0
   clock_gettime: Returning tp=(43201232,330000000)
   Tclock_gettime: clock_id=0
   clock_gettime: Returning tp=(43201232,330000000)
   imclock_gettime: clock_id=0
   clock_gettime: Returning tp=(43201232,340000000)
   er expired 43201232 sec 330000000 nsec
   Test for value 43201236 sec 330000005 nsec
   nxsig_notification: pid=4 signo=14 code=2 sival_ptr=0
   nxsig_tcbdispatch: TCB=0x8008c500 signo=14 code=2 value=0 mask=00004000
   clock_gettime: clock_id=0
   clock_gettime: Returning tp=(43201236,360000000)
   Tinxsig_tcbdispatch: TCB=0x8008bde0 signo=17 code=5 value=0 mask=00000000
   up_exit: TCB=0x8008c500 exiting
   nxsig_tcbdispatch: TCB=0x8008bde0 signo=17 code=5 value=0 mask=00000000
   mer expired 43201236 sec 360000000 nsec
   Test PASSED
   
   Also killing task when the task is in sleep() works:
   
   task_spawn: name=hello entry=0x800496f0 file_actions=0x800c2230 
attr=0x800c2238 argv=0x800c2320
   spawn_execattrs: Setting policy=2 priority=100 for pid=5
   
   hello [5:100]
   nsh> kill 5
   nxsig_tcbdispatch: TCB=0x8008c500 signo=15 code=0 value=0 mask=00000000
   nxsig_tcbdispatch: TCB=0x8008c500 signo=15 code=0 value=0 mask=00000000
   up_schedule_sigaction: tcb=0x8008c500 sigdeliver=0x80001fbc
   up_schedule_sigaction: rtcb=0x8008c500 CURRENT_REGS=0x800c3bf0
   up_schedule_sigaction: PC/STATUS Saved: 00000000800501dc/8000000a00004080 
New: 0000000080009992/8000000a00005800
   riscv_sigdeliver: rtcb=0x8008c500 sigdeliver=0x80001fbc 
sigpendactionq.head=0x800880d0
   nxsig_deliver: Deliver signal 15 to PID 5
   nxsig_tcbdispatch: TCB=0x8008bde0 signo=17 code=5 value=0 mask=00000000
   up_exit: TCB=0x8008c500 exiting
   nxsig_tcbdispatch: TCB=0x8008bde0 signo=17 code=5 value=0 mask=00000000
   nsh> ps
     PID GROUP PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK   STACK   
USED  FILLED COMMAND
       0     0   0 FIFO     Kthread N-- Ready              00000000 002000 
001472  73.6%  Idle Task
       1     1 224 RR       Kthread --- Waiting  Semaphore 00000000 004000 
000704  17.6%  hpwork 0x80082240
       2     2 100 RR       Kthread --- Waiting  Semaphore 00000000 004000 
000704  17.6%  lpwork 0x80082270
       3     3 100 RR       Task    --- Running            00000000 002992 
002336  78.0%  nsh_main
   nsh> 
   
   Hello is simply:
   
   ```
   int main(void)
   {
     while(true)
       {
         sleep(5);
       }
     return 0;
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to