Fix-Point opened a new pull request, #22215:
URL: https://github.com/apache/nuttx/pull/22215

   ## Summary
   
   This PR brings the spinlock debug/monitoring front to the same level as the
   downstream implementation used as the reference: it introduces spinlock
   instrumentation, completes the irqdis rename, adds holder-call-stack
   backtrace support, aligns the seqlock headers, and fixes two defects
   (unlock ordering, arch include cycles) that the earlier debug-tools merge
   did not carry.
   
   1. **Extend IRQ-disabled-time monitoring to spinlocks** (`sched/irq: extend
      interrupt-disabled time monitoring to spinlock` + `fix critmonitor irqdis
      tracking in notrace and interrupt context`): the critmon timers now
      account the interrupt-disabled window while a spinlock is held
      (``nxsched_critmon_irqdisable()``), and the accounting is kept consistent
      in the notrace paths and in interrupt context. 
``irq_save()/irq_restore()``
      provide a single instrumentation point.
   2. **Reset critmon state on task restart** (`task_restart: restore critmon
      info`): a restarted child no longer inherits stale per-task maxima.
   3. **Rename ``csection`` monitoring symbols to ``irqdis``**
      (`sched/irq: rename csection monitoring symbols to irqdis` + `complete
      the irqdis rename in documentation and nxgdb`): the timer counters are
      named after the disabled-interrupt window they measure; the rename is
      carried across the source tree, Kconfig help, documentation and the nxgdb
      support code, with a "no remaining references" check.
   4. **Spinlock holder backtrace** (`sched/spinlock: Add backtrace information
      of lock holder in spinlock debugging.` + `backtrace: skip KASAN
      instrumentation in backtrace_remove to fix busyloop`): with
      ``CONFIG_SPINLOCK_BACKTRACE`` the debug tools record the holder's call
      stack so a misuse report can show the faulting code; the hot-path
      ``backtrace_remove()`` is exempted from KASAN shadow checks to avoid a
      busy-loop on memory-heavy workloads.
   5. **rspinlock trace/notrace split** (`add sched_note_spinlock trace points`,
      `add notrace versions`, `separate trace and notrace irq paths to fix
      recursion`): the rspinlock lock/unlock paths distinguish the traced and
      notrace variants so instrumentation does not recurse into the marked
      paths; composite ``sched_note`` hooks are split into per-type entries
      (`sched/note: split composite hook macros into per-type entries`).
   6. **Unlock ordering fix** (`spinlock: mark spinlock unlocked before
      releasing the lock`): ``spin_unlock()``/``spin_unlock_irqrestore()`` now
      clear the debug holder before releasing the lock value, removing a SMP
      window where another thread could acquire the lock while the old holder
      was still recorded (a spurious "relock" report).
   7. **Seqlock alignment** (`seqlock: Move the header files to decouple
      compilation dependencies.` + `seqlock: align seqlock.h with the downstream
      seqlock terminal form`): the seqlock header is decoupled and its types are
      aligned (``seqcount_t.sequence`` as ``atomic_t`` on SMP).
   8. **Break ``irq.h`` include cycles in arch headers**
      (`sched/irq: break the remaining irq.h include cycles in arch headers` +
      `arch/risc-v: fix circular include that breaks critmon build`): the
      instrumented ``irq_save()`` makes ``<nuttx/irq.h>`` depend on the arch
      ``up_irq_save()``/``up_irq_restore()`` primitives; arch headers that
      define those no longer include ``<nuttx/irq.h>`` themselves (arm 
sub-arches,
      avr, hc, or1k, risc-v mode.h), fixing "static declaration follows
      non-static declaration" build errors.
   9. **Document the spinlock debug tools** (`Documentation: document the
      spinlock debug tools`): new ``Documentation/debugging/spinlockdebug.rst``
      describing ``CONFIG_SPINLOCK_DEBUG`` and ``CONFIG_SPINLOCK_BACKTRACE``,
      registered in the debugging index.
   
   ## Impact
   
   - **User impact**: observable IRQ-disabled durations for spinlock holders and
     holder backtraces in misuse reports; ``csection``-named monitor symbols
     renamed to ``irqdis``.
   - **Build**: ``CONFIG_SCHED_CRITMONITOR_MAXTIME_IRQDISABLE``/``BUSYWAIT``
     dimensions now cover spinlock holders; ``CONFIG_SPINLOCK_BACKTRACE``
     (depends on ``SPINLOCK_DEBUG && LIBC_BACKTRACE_DEPTH > 0``) adds the
     holder stack recording; ``#include <nuttx/irq.h>`` removed from 14 arch
     headers.
   - **Compatibility**: renamed symbols (``nxsched_critmon_csection`` →
     ``nxsched_critmon_irqdisable``, ``crit_*`` TCB fields → ``irqdis_*``);
     procfs/nxgdb tools updated; no public API removed beyond the rename.
   - **Documentation**: new ``spinlockdebug.rst``; docs updated for the rename.
   - **Security**: no new attack surface.
   - **Hardware**: none.
   
   ## Testing
   
   Build Host: Linux x86_64
   
   Boards/Configurations:
   - `qemu-armv7a:smp` with `CONFIG_SPINLOCK_DEBUG=y`,
     `CONFIG_SPINLOCK_BACKTRACE=y`, `CONFIG_SCHED_CRITMONITOR=y`,
     `CONFIG_SCHED_BACKTRACE=y`, `CONFIG_TESTING_OSTEST=y`
   - `rv-virt:smp` (risc-v) with `CONFIG_SPINLOCK_DEBUG=y`
   
   Verification:
   - `tools/checkpatch.sh` green on every commit (17/17).
   - Full ``ostest`` on `qemu-armv7a:smp` 4 CPUs with the full feature chain:
     the wqueue/HPWORK segment reports no false relock, all segments complete,
     ``ostest_main: Exiting with status 0``.
   
   ```
   nsh> ostest
   stdio_test: write fd=1
   stdio_test: Standard I/O Check: printf
   stdio_test: write fd=2
   stdio_test: Standard I/O Check: fprintf to stderr
   ostest_main: putenv(Variable1=BadValue3)
   ostest_main: setenv(Variable1, GoodValue1, TRUE)
   ostest_main: setenv(Variable2, BadValue1, FALSE)
   ostest_main: setenv(Variable2, GoodValue2, TRUE)
   ostest_main: setenv(Variable3, GoodValue3, FALSE)
   ostest_main: setenv(Variable3, BadValue2, FALSE)
   show_variable: Variable=Variable1 has value=GoodValue1
   show_variable: Variable=Variable2 has value=GoodValue2
   show_variable: Variable=Variable3 has value=GoodValue3
   ostest_main: Started user_main at PID=9
   
   user_main: vfork() test
   vfork_test: Started
   vfork_test: Child 10 ran and exited before the parent resumed
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks         7        7
   mxordblk  79cdb78  79cdb78
   uordblks     7cb4     7cb4
   fordblks  79d2ec8  79d2ec8
   
   user_main: Begin argument test
   user_main: Started with argc=5
   user_main: argv[0]="ostest"
   user_main: argv[1]="Arg1"
   user_main: argv[2]="Arg2"
   user_main: argv[3]="Arg3"
   user_main: argv[4]="Arg4"
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks         7        7
   mxordblk  79cdb78  79cdb78
   uordblks     7cb4     7cb4
   fordblks  79d2ec8  79d2ec8
   
   user_main: getopt() test
   getopt():  Simple test
   getopt():  Invalid argument
   getopt():  Missing optional argument
   getopt_long():  Simple test
   getopt_long():  No short options
   getopt_long():  Argument for --option=argument
   getopt_long():  Invalid long option
   getopt_long():  Mixed long and short options
   getopt_long():  Invalid short option
   getopt_long():  Missing optional arguments
   getopt_long_only():  Mixed long and short options
   getopt_long_only():  Single hyphen long options
   getopt():  "--" ends the options
   getopt():  "-" is an operand
   getopt_long():  "--" ends the options
   getopt_long():  "-" is an operand
   getopt_long_only():  "--" ends the options
   getopt_long_only():  "-" is an operand
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks         7        7
   mxordblk  79cdb78  79cdb78
   uordblks     7cb4     7cb4
   fordblks  79d2ec8  79d2ec8
   
   user_main: libc tests
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks         7        7
   mxordblk  79cdb78  79cdb78
   uordblks     7cb4     7cb4
   fordblks  79d2ec8  79d2ec8
   show_variable: Variable=Variable1 has value=GoodValue1
   show_variable: Variable=Variable2 has value=GoodValue2
   show_variable: Variable=Variable3 has value=GoodValue3
   show_variable: Variable=Variable1 has no value
   show_variable: Variable=Variable2 has value=GoodValue2
   show_variable: Variable=Variable3 has value=GoodValue3
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks         7        7
   mxordblk  79cdb78  79cdb78
   uordblks     7cb4     7cb4
   fordblks  79d2ec8  79d2ec8
   show_variable: Variable=Variable1 has no value
   show_variable: Variable=Variable2 has no value
   show_variable: Variable=Variable3 has no value
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks         7        8
   mxordblk  79cdb78  79cdb78
   uordblks     7cb4     7c84
   fordblks  79d2ec8  79d2ef8
   
   user_main: setvbuf test
   setvbuf_test: Test NO buffering
   setvbuf_test: Using NO buffering
   
   setvbuf_test: Test default FULL buffering
   setvbuf_test: Using default FULL buffering
   
   setvbuf_test: Test FULL buffering, buffer size 64
   setvbuf_test: Using FULL buffering, buffer size 64
   
   setvbuf_test: Test FULL buffering, pre-allocated buffer
   setvbuf_test: Using FULL buffering, pre-allocated buffer
   
   setvbuf_test: Test LINE buffering, buffer size 64
   setvbuf_test: Using LINE buffering, buffer size 64
   
   setvbuf_test: Test FULL buffering, pre-allocated buffer
   setvbuf_test: Using FULL buffering, pre-allocated buffer
   
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks         8        8
   mxordblk  79cdb78  79cdb78
   uordblks     7c84     7c84
   fordblks  79d2ef8  79d2ef8
   
   user_main: /dev/null test
   dev_null: Read 0 bytes from /dev/null
   dev_null: Wrote 1024 bytes to /dev/null
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks         8        8
   mxordblk  79cdb78  79cdb78
   uordblks     7c84     7c84
   fordblks  79d2ef8  79d2ef8
   
   user_main: FPU test
   Starting task FPU#1
   fpu_test: Started task FPU#1 at PID=11
   FPU#1: pass 1
   Starting task FPU#2
   fpu_test: Started task FPU#2 at PID=12
   FPU#2: pass 1
   FPU#1: pass 2
   FPU#2: pass 2
   FPU#1: pass 3
   FPU#2: pass 3
   FPU#1: pass 4
   FPU#2: pass 4
   FPU#1: pass 5
   FPU#2: pass 5
   FPU#1: pass 6
   FPU#2: pass 6
   FPU#1: pass 7
   FPU#2: pass 7
   FPU#1: pass 8
   FPU#2: pass 8
   FPU#1: pass 9
   FPU#2: pass 9
   FPU#1: pass 10
   FPU#2: pass 10
   FPU#1: pass 11
   FPU#2: pass 11
   FPU#1: pass 12
   FPU#2: pass 12
   FPU#1: pass 13
   FPU#2: pass 13
   FPU#1: pass 14
   FPU#2: pass 14
   FPU#1: pass 15
   FPU#2: pass 15
   FPU#1: pass 16
   FPU#2: pass 16
   FPU#1: Succeeded
   FPU#2: Succeeded
   fpu_test: Returning
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks         8        8
   mxordblk  79cdb78  79cdb78
   uordblks     7c84     7c84
   fordblks  79d2ef8  79d2ef8
   
   user_main: task_restart test
   
   Test task_restart()
   restart_main: setenv(VarName, VarValue, TRUE)
   restart_main: Started restart_main at PID=13
   restart_main: Started with argc=4
   restart_main: argv[0]="ostest"
   restart_main: argv[1]="This is argument 1"
   restart_main: argv[2]="Argument 2 here"
   restart_main: argv[3]="Lastly, the 3rd argument"
   restart_main: Variable=VarName has value=VarValue
   restart_main: I am still here
   restart_main: I am still here
   restart_main: Started restart_main at PID=13
   restart_main: Started with argc=4
   restart_main: argv[0]="ostest"
   restart_main: argv[1]="This is argument 1"
   restart_main: argv[2]="Argument 2 here"
   restart_main: argv[3]="Lastly, the 3rd argument"
   restart_main: Variable=VarName has value=VarValue
   restart_main: Started with argc=4
   restart_main: argv[0]="ostest"
   restart_main: argv[1]="This is argument 1"
   restart_main: argv[2]="Argument 2 here"
   restart_main: argv[3]="Lastly, the 3rd argument"
   restart_main: Variable=VarName has value=VarValue
   restart_main: Exiting
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks         8        7
   mxordblk  79cdb78  79cdb78
   uordblks     7c84     7cc4
   fordblks  79d2ef8  79d2eb8
   
   user_main: waitpid test
   
   Test waitpid()
   waitpid_start_child: Started waitpid_main at PID=14
   waitpid_main: PID 14 Started
   waitpid_start_child: Started waitpid_main at PID=15
   waitpid_main: PID 15 Started
   waitpid_start_child: Started waitpid_main at PID=21
   waitpid_main: PID 21 Started
   waitpid_test: Waiting for PID=14 with waitpid()
   waitpid_main: PID 14 exiting with result=14
   waitpid_test: PASS: PID 21 waitpid failed with ECHILD.  That 
maywaitpid_main: PID 15 exiting with result=14
    be
   waitpid_main: PID 21 exiting with result=14
                 acceptable because child status is disabled on this thread.
   waitpid_last: Waiting for PID=21 with waitpid()
   waitpid_last: PASS: PID 21 waitpid failed with ECHILD.  That may be
                 acceptable because child status is disabled on this thread.
   
   Test waitid(P_PID)
   waitpid_start_child: Started waitpid_main at PID=26
   waitpid_main: PID 26 Started
   waitpid_main: PID 27 Started
   waitpid_start_child: Started waitpid_main at PID=27
   waitpid_start_child: Started waitpid_main at PID=28
   waitpid_main: PID 28 Started
   waitpid_test: Waiting for PID=26 with waitid()
   waitpid_main: PID 26 exiting with result=14
   waitpid_test: PASS: PID 28 waitpid failed with ECHILD.  That may be
   waitpid_main: PID 27 exiting with result=14
                 acceptable because child status is disabled on this thread.
   waitpid_main: PID 28 exiting with result=14
   waitpid_last: Waiting for PID=28 with waitpid()
   waitpid_last: PASS: PID 28 waitpid failed with ECHILD.  That may be
                 acceptable because child status is disabled on this thread.
   
   Test waitid(P_ALL)
   waitpid_start_child: Started waitpid_main at PID=29
   waitpid_main: PID 29 Started
   waitpid_start_child: Started waitpid_main at PID=30
   waitpid_main: PID 30 Started
   waitpid_start_child: Started waitpid_main at PID=31
   waitpid_main: PID 31 Started
   waitpid_test: Waiting for any child with waitid()
   waitpid_main: PID 29 exiting with result=14
   waitpid_main: PID 30 exiting with result=14
   waitpid_main: PID 31 exiting with result=14
   waitpid_test: PASS: PID 31 waitpid failed with ECHILD.  That may be
                 acceptable because child status is disabled on this thread.
   waitpid_last: Waiting for PID=31 with waitpid()
   waitpid_last: PASS: PID 31 waitpid failed with ECHILD.  That may be
                 acceptable because child status is disabled on this thread.
   
   Test wait()
   waitpid_start_child: Started waitpid_main at PID=37
   waitpid_main: PID 37 Started
   waitpid_start_child: Started waitpid_main at PID=42
   waitpid_main: PID 42 Started
   waitpid_main: PID 43 Started
   waitpid_start_child: Started waitpid_main at PID=43
   waitpid_test: Waiting for any child with wait()
   waitpid_main: PID 37 exiting with result=14
   waitpid_main: PID 42 exiting with result=14
   waitpid_main: PID 43 exiting with result=14
   waitpid_test: PASS: PID 43 waitpid failed with ECHILD.  That may be
                 acceptable because child status is disabled on this thread.
   waitpid_last: Waiting for PID=43 with waitpid()
   waitpid_last: PASS: PID 43 waitpid failed with ECHILD.  That may be
                 acceptable because child status is disabled on this thread.
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks         7       11
   mxordblk  79cdb78  79b9b78
   uordblks     7cc4     bec4
   fordblks  79d2eb8  79cecb8
   
   user_main: wqueue test
   wqueue_test: backend = flat
   wqueue_test: HPWORK
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: HPWORK done
   wqueue_test: custom queue, threads = 1
   wqueue_test: priority = 100, expect = 100
   wqueue_test: API validation
   wqueue_test: API validation done
   wqueue_test: periodic requeue
   wqueue_test: periodic calls = 3, expect = 3
   wqueue_test: pending replacement
   wqueue_test: replacement total = 2, expect = 2
   wqueue_test: sync cancel finished = 1, expect = 1
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: custom queue, threads = 1 done
   wqueue_test: custom queue, threads = 2
   wqueue_test: priority = 100, expect = 100
   wqueue_test: sync cancel finished = 1, expect = 1
   wqueue_test: parallel sync cancel
   wqueue_test: parallel callbacks = 2, expect = 2
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: call = 100, expect = 100
   wqueue_test: custom queue, threads = 2 done
   wqueue_test: multiple custom queues
   wqueue_test: multiple queues loop 1/4 done
   wqueue_test: multiple queues loop 2/4 done
   wqueue_test: multiple queues loop 3/4 done
   wqueue_test: multiple queues loop 4/4 done
   wqueue_test: multiple custom queues done
   wqueue_test: self free
   wqueue_test: self free result = -35, expect = -35
   wqueue_test: teardown
   wqueue_test: pending callback = 0, expect = 0
   wqueue_test: running callback = 1, expect = 1
   wqueue_test: teardown requeue rejected
   wqueue_test: teardown done
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        11       24
   mxordblk  79b9b78  797bb78
   uordblks     bec4    1a604
   fordblks  79cecb8  79c0578
   
   user_main: mutex test
   Initializing mutex
   Starting thread 1
   Starting thread 2
                Thread1 Thread2
        Loops   32      32
        Errors  0       0
   
   Testing moved mutex
   Starting moved mutex thread 1
   Starting moved mutex thread 2
                Thread1 Thread2
        Moved Loops     32      32
        Moved Errors    0       0
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        24       16
   mxordblk  797bb78  797bb78
   uordblks    1a604     f10c
   fordblks  79c0578  79cba70
   
   user_main: timed mutex test
   mutex_test: Initializing mutex
   mutex_test: Starting thread
   pthread:  Started
   pthread:  Waiting for lock or timeout
   mutex_test: Unlocking
   pthread:  Got the lock
   pthread:  Waiting for lock or timeout
   pthread:  Got the timeout.  Terminating
   mutex_test: PASSED
   timedmutex regression test: PASSED
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        16       16
   mxordblk  797bb78  797bb78
   uordblks     f10c     f10c
   fordblks  79cba70  79cba70
   
   user_main: cancel test
   cancel_test: Test 1a: Normal Cancellation
   cancel_test: Starting thread
   start_thread: Initializing mutex
   start_thread: Initializing cond
   start_thread: Starting thread
   start_thread: Yielding
   sem_waiter: Taking mutex
   sem_waiter: Starting wait for condition
   cancel_test: Canceling thread
   cancel_test: Joining
   cancel_test: waiter exited with result=0xffffffff
   cancel_test: PASS thread terminated with PTHREAD_CANCELED
   cancel_test: Test 2: Asynchronous Cancellation
   ... Skipped
   cancel_test: Test 3: Cancellation of detached thread
   cancel_test: Re-starting thread
   restart_thread: Broadcasting cond to clear waiters
   restart_thread: Destroying cond
   restart_thread: Destroying mutex
   restart_thread: Re-starting thread
   start_thread: Initializing mutex
   start_thread: Initializing cond
   start_thread: Starting thread
   start_thread: Yielding
   sem_waiter: Taking mutex
   sem_waiter: Starting wait for condition
   cancel_test: Canceling thread
   cancel_test: Joining
   cancel_test: PASS pthread_join failed with status=ESRCH
   cancel_test: Test 5: Non-cancelable threads
   cancel_test: Re-starting thread (non-cancelable)
   restart_thread: Broadcasting cond to clear waiters
   restart_thread: Destroying cond
   restart_thread: Destroying mutex
   restart_thread: Re-starting thread
   start_thread: Initializing mutex
   start_thread: Initializing cond
   start_thread: Starting thread
   start_thread: Yielding
   sem_waiter: Taking mutex
   sem_waiter: Starting wait for condition
   sem_waiter: Setting non-cancelable
   cancel_test: Canceling thread
   cancel_test: Joining
   sem_waiter: Releasing mutex
   sem_waiter: Setting cancelable
   cancel_test: waiter exited with result=0xffffffff
   cancel_test: PASS thread terminated with PTHREAD_CANCELED
   cancel_test: Test 6: Cancel message queue wait
   cancel_test: Starting thread (cancelable)
   Skipped
   cancel_test: Test 7: Cancel signal wait
   cancel_test: Starting thread (cancelable)
   Skipped
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        16       11
   mxordblk  797bb78  7999b98
   uordblks     f10c     8e0c
   fordblks  79cba70  79d1d70
   
   user_main: robust test
   robust_test: Initializing mutex
   robust_test: Starting thread
   robust_waiter: Taking mutex
   robust_waiter: Exiting with mutex
   robust_test: Take the lock again
   robust_test: Make the mutex consistent again.
   robust_test: Take the lock again
   robust_test: Joining
   robust_test: waiter exited with result=0
   robust_test: Test complete with nerrors=0
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        11       11
   mxordblk  7999b98  7999b98
   uordblks     8e0c     8e0c
   fordblks  79d1d70  79d1d70
   
   user_main: semaphore test
   sem_test: Initializing semaphore to 0
   sem_test: Starting waiter thread 1
   sem_test: Set thread 1 priority to 191
   sem_test: Starting waiter thread 2
   waiter_func: Thread 1 Started
   sem_test: Set thread 2 priority to 128
   waiter_func: Thread 1 initial semaphore value = 0
   waiter_func: Thread 2 Started
   waiter_func: Thread 1 waiting on semaphore
   waiter_func: Thread 2 initial semaphore value = 0
   waiter_func: Thread 2 waiting on semaphore
   sem_test: Starting poster thread 3
   sem_test: Set thread 3 priority to 64
   poster_func: Thread 3 started
   poster_func: Thread 3 semaphore value = -2
   poster_func: Thread 3 posting semaphore
   waiter_func: Thread 1 awakened
   poster_func: Thread 3 new semaphore value = -1
   waiter_func: Thread 1 new semaphore value = -1
   poster_func: Thread 3 semaphore value = -1
   waiter_func: Thread 1 done
   poster_func: Thread 3 posting semaphore
   waiter_func: Thread 2 awakened
   poster_func: Thread 3 new semaphore value = 0
   waiter_func: Thread 2 new semaphore value = 0
   poster_func: Thread 3 done
   waiter_func: Thread 2 done
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        11       13
   mxordblk  7999b98  7999b98
   uordblks     8e0c     9f14
   fordblks  79d1d70  79d0c68
   
   user_main: timed semaphore test
   semtimed_test: Initializing semaphore to 0
   semtimed_test: Waiting for two second timeout
   semtimed_test: PASS: first test returned timeout
   BEFORE: (1682380880 sec, 990563360 nsec)
   AFTER:  (1682380882 sec, 991677568 nsec)
   semtimed_test: Starting poster thread
   semtimed_test: Set thread 1 priority to 191
   semtimed_test: Starting poster thread 3
   semtimed_test: Set thread 3 priority to 64
   semtimed_test: Waiting for two second timeout
   poster_func: Waiting for 1 second
   poster_func: Posting
   semtimed_test: PASS: sem_timedwait succeeded
   BEFORE: (1682380882 sec, 995482336 nsec)
   AFTER:  (1682380883 sec, 996967632 nsec)
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        13       12
   mxordblk  7999b98  7999b98
   uordblks     9f14     9f14
   fordblks  79d0c68  79d0c68
   
   user_main: condition variable test
   cond_test: Initializing mutex
   cond_test: Initializing cond
   cond_test: Starting waiter
   cond_test: Set thread 1 priority to 128
   waiter_thread: Started
   cond_test: Starting signaler
   cond_test: Set thread 2 priority to 64
   thread_signaler: Started
   thread_signaler: Terminating
   cond_test: signaler terminated, now cancel the waiter
   cond_test:   Waiter  Signaler
   cond_test: Loops     32      32
   cond_test: Errors    0       0
   cond_test:
   cond_test: 0 times, waiter did not have to wait for data
   cond_test: 0 times, data was already available when the signaler run
   cond_test: 0 times, the waiter was in an unexpected state when the signaler 
ran
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        12       14
   mxordblk  7999b98  7999b98
   uordblks     9f14     b01c
   fordblks  79d0c68  79cfb60
   
   user_main: pthread_exit() test
   pthread_exit_test: Started pthread_exit_main at PID=503
   pthread_exit_main 503: Starting pthread_exit_thread
   pthread_exit_main 503: Sleeping for 5 seconds
   pthread_exit_thread 504: Sleeping for 10 second
   pthread_exit_thread 504: Still running...
   pthread_exit_main 503: Calling pthread_exit()
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        14       15
   mxordblk  7999b98  7999b98
   uordblks     b01c     c124
   fordblks  79cfb60  79cea58
   
   user_main: pthread_rwlock test
   pthread_rwlock: Initializing rwlock
   pthread_exit_thread 504: Exiting
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        15       12
   mxordblk  7999b98  7999b98
   uordblks     c124     9f24
   fordblks  79cea58  79d0c58
   
   user_main: pthread_rwlock_cancel test
   pthread_rwlock_cancel: Starting test
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        12       12
   mxordblk  7999b98  7999b98
   uordblks     9f24     9f24
   fordblks  79d0c58  79d0c58
   
   user_main: pthread_sigqueue test
   pthread_sigqueue_test: SUCCESS
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        12       12
   mxordblk  7999b98  7999b98
   uordblks     9f24     9f24
   fordblks  79d0c58  79d0c58
   
   user_main: timed wait test
   thread_waiter: Initializing mutex
   timedwait_test: Initializing cond
   timedwait_test: Starting waiter
   timedwait_test: Set thread 2 priority to 177
   timedwait_test: Joining
   thread_waiter: Taking mutex
   thread_waiter: Starting 5 second wait for condition
   thread_waiter: pthread_cond_timedwait timed out
   thread_waiter: Releasing mutex
   thread_waiter: Exit with status 0x12345678
   timedwait_test: waiter exited with result=0x12345678
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        12       12
   mxordblk  7999b98  7999b98
   uordblks     9f24     9f24
   fordblks  79d0c58  79d0c58
   
   user_main: timed message queue test
   timedmqueue_test: Starting sender
   timedmqueue_test: Waiting for sender to complete
   sender_thread: Starting
   sender_thread: mq_timedsend succeeded on msg 0
   sender_thread: mq_timedsend succeeded on msg 1
   sender_thread: mq_timedsend succeeded on msg 2
   sender_thread: mq_timedsend succeeded on msg 3
   sender_thread: mq_timedsend succeeded on msg 4
   sender_thread: mq_timedsend succeeded on msg 5
   sender_thread: mq_timedsend succeeded on msg 6
   sender_thread: mq_timedsend succeeded on msg 7
   sender_thread: mq_timedsend succeeded on msg 8
   sender_thread: mq_timedsend 9 timed out as expected
   sender_thread: returning nerrors=0
   timedmqueue_test: Starting receiver
   timedmqueue_test: Waiting for receiver to complete
   receiver_thread: Starting
   receiver_thread: mq_timedreceive succeed on msg 0
   receiver_thread: mq_timedreceive succeed on msg 1
   receiver_thread: mq_timedreceive succeed on msg 2
   receiver_thread: mq_timedreceive succeed on msg 3
   receiver_thread: mq_timedreceive succeed on msg 4
   receiver_thread: mq_timedreceive succeed on msg 5
   receiver_thread: mq_timedreceive succeed on msg 6
   receiver_thread: mq_timedreceive succeed on msg 7
   receiver_thread: mq_timedreceive succeed on msg 8
   receiver_thread: Receive 9 timed out as expected
   receiver_thread: returning nerrors=0
   timedmqueue_test: Test complete
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        12       13
   mxordblk  7999b98  7999b98
   uordblks     9f24     9f8c
   fordblks  79d0c58  79d0bf0
   
   user_main: sigprocmask test
   sigprocmask_test: SUCCESS
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        13       13
   mxordblk  7999b98  7999b98
   uordblks     9f8c     9f8c
   fordblks  79d0bf0  79d0bf0
   
   user_main: message queue test
   mqueue_test: Starting receiver
   mqueue_test: Set receiver priority to 128
   mqueue_test: Starting sender
   receiver_thread: Starting
   mqueue_test: Set sender thread priority to 64
   mqueue_test: Waiting for sender to complete
   sender_thread: Starting
   sender_thread: mq_send succeeded on msg 0
   receiver_thread: mq_receive succeeded on msg 0
   sender_thread: mq_send succeeded on msg 1
   receiver_thread: mq_receive succeeded on msg 1
   sender_thread: mq_send succeeded on msg 2
   receiver_thread: mq_receive succeeded on msg 2
   sender_thread: mq_send succeeded on msg 3
   receiver_thread: mq_receive succeeded on msg 3
   sender_thread: mq_send succeeded on msg 4
   receiver_thread: mq_receive succeeded on msg 4
   sender_thread: mq_send succeeded on msg 5
   receiver_thread: mq_receive succeeded on msg 5
   sender_thread: mq_send succeeded on msg 6
   receiver_thread: mq_receive succeeded on msg 6
   sender_thread: mq_send succeeded on msg 7
   receiver_thread: mq_receive succeeded on msg 7
   sender_thread: mq_send succeeded on msg 8
   receiver_thread: mq_receive succeeded on msg 8
   sender_thread: mq_send succeeded on msg 9
   receiver_thread: mq_receive succeeded on msg 9
   sender_thread: returning nerrors=0
   mqueue_test: Killing receiver
   receiver_thread: mq_receive interrupted!
   receiver_thread: returning nerrors=0
   mqueue_test: Canceling receiver
   mqueue_test: receiver has already terminated
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        13       11
   mxordblk  7999b98  7999b98
   uordblks     9f8c     af8c
   fordblks  79d0bf0  79cfbf0
   
   user_main: signal handler test
   sighand_test: Initializing semaphore to 0
   sighand_test: Unmasking SIGCHLD
   sighand_test: Registering SIGCHLD handler
   sighand_test: Starting waiter task
   sighand_test: Started waiter_main pid=526
   waiter_main: Waiter started
   waiter_main: Unmasking signal 32
   waiter_main: Registering signal handler
   waiter_main: oact.sigaction=0 oact.sa_flags=0 oact.sa_mask=0000000000000000
   waiter_main: Waiting on semaphore
   sighand_test: Signaling pid=526 with signo=32 sigvalue=42
   waiter_main: sem_wait() successfully interrupted by signal
   waiter_main: done
   sighand_test: done
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        11       11
   mxordblk  7999b98  7999b98
   uordblks     af8c     afa4
   fordblks  79cfbf0  79cfbd8
   
   user_main: nested signal handler test
   signest_test: Starting signal waiter task at priority 101
   signest_test: Started waiter_main pid=527
   waiter_main: Waiter started
   signest_test: Starting interfering task at priority 102
   waiter_main: Setting signal mask
   interfere_main: Waiting on semaphore
   waiter_main: Registering signal handler
   signest_test: Started interfere_main pid=528
   waiter_main: Waiting on semaphore
   signest_test: Simple case:
     Total signalled 1240  Odd=620 Even=620
     Total handled   1240  Odd=620 Even=620
     Total nested    0    Odd=0   Even=0  
   signest_test: With task locking
     Total signalled 2480  Odd=1240 Even=1240
     Total handled   2480  Odd=1240 Even=1240
     Total nested    0    Odd=0   Even=0  
   signest_test: With interfering thread
     Total signalled 3720  Odd=1860 Even=1860
     Total handled   3720  Odd=1860 Even=1860
     Total nested    0    Odd=0   Even=0  
   signest_test: done
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        11       13
   mxordblk  7999b98  7999b98
   uordblks     afa4     c004
   fordblks  79cfbd8  79ceb78
   
   user_main: POSIX timer test
   timer_test: Masking signal 32
   timer_test: Creating timer
   timer_test: Starting timer
   timer_test: Waiting on sigwaitinfo
   timer_test: sigwaitinfo() returned signo=32
   timer_expiration: sival_int=42
   timer_expiration: si_code=2 (SI_TIMER)
   timer_expiration: g_nsigreceived=1
   timer_test: Waiting on sigwaitinfo
   timer_test: sigwaitinfo() returned signo=32
   timer_expiration: sival_int=42
   timer_expiration: si_code=2 (SI_TIMER)
   timer_expiration: g_nsigreceived=2
   timer_test: Waiting on sigwaitinfo
   timer_test: sigwaitinfo() returned signo=32
   timer_expiration: sival_int=42
   timer_expiration: si_code=2 (SI_TIMER)
   timer_expiration: g_nsigreceived=3
   timer_test: Waiting on sigwaitinfo
   timer_test: sigwaitinfo() returned signo=32
   timer_expiration: sival_int=42
   timer_expiration: si_code=2 (SI_TIMER)
   timer_expiration: g_nsigreceived=4
   timer_test: Waiting on sigwaitinfo
   timer_test: sigwaitinfo() returned signo=32
   timer_expiration: sival_int=42
   timer_expiration: si_code=2 (SI_TIMER)
   timer_expiration: g_nsigreceived=5
   timer_test: Deleting timer
   timer_test: done
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        13       13
   mxordblk  7999b98  7999b98
   uordblks     c004     c004
   fordblks  79ceb78  79ceb78
   
   user_main: spinlock test
   spinlock_test: start......
   Thread num: 1, Loop times: 50000
   
   Test type: spinlock
   spinlock: Test Results:
   spinlock: Final counter: 50000
   spinlock: Average throughput : 28450 op/s
   spinlock: Total execution time: 1758208624 ns
    
   Test type: rspinlock
   rspinlock: Test Results:
   rspinlock: Final counter: 50000
   rspinlock: Average throughput : 28290 op/s
   rspinlock: Total execution time: 1768133408 ns
    
   Test type: seqcount
   seqcount: Test Results:
   seqcount: Final counter: 50000
   seqcount: Average throughput : 6952617 op/s
   seqcount: Total execution time: 7736368 ns
    
   Thread num: 2, Loop times: 50000
   
   Test type: spinlock
   spinlock: Test Results:
   spinlock: Final counter: 100000
   spinlock: Average throughput : 14094 op/s
   spinlock: Total execution time: 3548341536 ns
    
   Test type: rspinlock
   rspinlock: Test Results:
   rspinlock: Final counter: 100000
   rspinlock: Average throughput : 14069 op/s
   rspinlock: Total execution time: 3554765968 ns
    
   Test type: seqcount
   seqcount: Test Results:
   seqcount: Final counter: 100000
   seqcount: Average throughput : 3005222 op/s
   seqcount: Total execution time: 17591312 ns
    
   Thread num: 3, Loop times: 50000
   
   Test type: spinlock
   spinlock: Test Results:
   spinlock: Final counter: 150000
   spinlock: Average throughput : 9665 op/s
   spinlock: Total execution time: 5472204976 ns
    
   Test type: rspinlock
   rspinlock: Test Results:
   rspinlock: Final counter: 150000
   rspinlock: Average throughput : 8698 op/s
   rspinlock: Total execution time: 6476749904 ns
    
   Test type: seqcount
   seqcount: Test Results:
   seqcount: Final counter: 150000
   seqcount: Average throughput : 1592676 op/s
   seqcount: Total execution time: 33985488 ns
    
   Thread num: 4, Loop times: 50000
   
   Test type: spinlock
   spinlock: Test Results:
   spinlock: Final counter: 200000
   spinlock: Average throughput : 7052 op/s
   spinlock: Total execution time: 7571834320 ns
    
   Test type: rspinlock
   rspinlock: Test Results:
   rspinlock: Final counter: 200000
   rspinlock: Average throughput : 6276 op/s
   rspinlock: Total execution time: 8311329936 ns
    
   Test type: seqcount
   seqcount: Test Results:
   seqcount: Final counter: 200000
   seqcount: Average throughput : 1142680 op/s
   seqcount: Total execution time: 45389712 ns
    
   spinlock_test: end......
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        13       28
   mxordblk  7999b98  7988b78
   uordblks     c004    18d6c
   fordblks  79ceb78  79c1e10
   
   user_main: wdog test
   wdog_test start...
   wdtest_once 0 ns
   wdtest_once 0 ns
   wdtest_once 0 ns
   wdtest_once 0 ns
   wdtest_once 0 ns
   wdtest_once 0 ns
   wdtest_once 0 ns
   wdtest_once 0 ns
   wdtest_once 0 ns
   wdtest_once 0 ns
   wdtest_once 1 ns
   wdtest_once 0 ns
   wdtest_once 0 ns
   wdtest_once 0 ns
   wdtest_once 0 ns
   wdtest_once 1 ns
   wdtest_once 1 ns
   wdtest_once 1 ns
   wdtest_once 1 ns
   wdtest_once 0 ns
   wdtest_once 0 ns
   wdtest_once 1 ns
   wdtest_once 1 ns
   wdtest_once 1 ns
   wdtest_once 1 ns
   wdtest_once 10 ns
   wdtest_once 1 ns
   wdtest_once 1 ns
   wdtest_once 1 ns
   wdtest_once 1 ns
   wdtest_once 1 ns
   wdtest_once 10 ns
   wdtest_once 10 ns
   wdtest_once 10 ns
   wdtest_once 10 ns
   wdtest_once 1 ns
   wdtest_once 1 ns
   wdtest_once 10 ns
   wdtest_once 10 ns
   wdtest_once 10 ns
   wdtest_once 10 ns
   wdtest_once 100 ns
   wdtest_once 10 ns
   wdtest_once 10 ns
   wdtest_once 10 ns
   wdtest_once 10 ns
   wdtest_once 10 ns
   wdtest_once 100 ns
   wdtest_once 100 ns
   wdtest_once 100 ns
   wdtest_once 100 ns
   wdtest_once 10 ns
   wdtest_once 10 ns
   wdtest_once 100 ns
   wdtest_once 100 ns
   wdtest_once 100 ns
   wdtest_once 100 ns
   wdtest_once 1000 ns
   wdtest_once 100 ns
   wdtest_once 100 ns
   wdtest_once 100 ns
   wdtest_once 100 ns
   wdtest_once 100 ns
   wdtest_once 1000 ns
   wdtest_once 1000 ns
   wdtest_once 1000 ns
   wdtest_once 1000 ns
   wdtest_once 100 ns
   wdtest_once 100 ns
   wdtest_once 1000 ns
   wdtest_once 1000 ns
   wdtest_once 1000 ns
   wdtest_once 1000 ns
   wdtest_once 1000 ns
   wdtest_once 10000 ns
   wdtest_once 1000 ns
   wdtest_once 1000 ns
   wdtest_once 1000 ns
   wdtest_once 1000 ns
   wdtest_once 10000 ns
   wdtest_once 10000 ns
   wdtest_once 10000 ns
   wdtest_once 10000 ns
   wdtest_once 1000 ns
   wdtest_once 1000 ns
   wdtest_once 10000 ns
   wdtest_once 10000 ns
   wdtest_once 10000 ns
   wdtest_once 10000 ns
   wdtest_once 10000 ns
   wdtest_once 10000 ns
   wdtest_once 100000 ns
   wdtest_once 10000 ns
   wdtest_once 10000 ns
   wdtest_once 10000 ns
   wdtest_once 100000 ns
   wdtest_once 100000 ns
   wdtest_once 100000 ns
   wdtest_once 100000 ns
   wdtest_once 10000 ns
   wdtest_once 10000 ns
   wdtest_once 100000 ns
   wdtest_once 100000 ns
   wdtest_once 100000 ns
   wdtest_once 100000 ns
   wdtest_once 100000 ns
   wdtest_once 100000 ns
   wdtest_once 1000000 ns
   wdtest_once 100000 ns
   wdtest_once 100000 ns
   wdtest_once 100000 ns
   wdtest_once 1000000 ns
   wdtest_once 1000000 ns
   wdtest_once 1000000 ns
   wdtest_once 1000000 ns
   wdtest_once 100000 ns
   wdtest_once 100000 ns
   wdtest_once 1000000 ns
   wdtest_once 1000000 ns
   wdtest_once 1000000 ns
   wdtest_once 1000000 ns
   wdtest_once 1000000 ns
   wdtest_once 1000000 ns
   wdtest_once 1000000 ns
   wdtest_once 1000000 ns
   wdtest_once 1000000 ns
   wdtest_once 1000000 ns
   wdtest_once 1000000 ns
   wd_start with maximum delay, cancel OK, rest 2305843009213693948
   wdtest_recursive 1000000ns
   wd_start with maximum delay, cancel OK, rest 2305843009213693948
   wd_start with maximum delay, cancel OK, rest 2305843009213693948
   wdtest_recursive 1000000ns
   wd_start with maximum delay, cancel OK, rest 2305843009213693948
   wd_start with maximum delay, cancel OK, rest 2305843009213693948
   wdtest_recursive 1000000ns
   wd_start with maximum delay, cancel OK, rest 2305843009213693948
   wdtest_recursive 1000000ns
   wd_start with maximum delay, cancel OK, rest 2305843009213693948
   wd_start with maximum delay, cancel OK, rest 2305843009213693948
   wdtest_recursive 1000000ns
   wd_start with maximum delay, cancel OK, rest 2305843009213693948
   wd_start with maximum delay, cancel OK, rest 2305843009213693948
   wd_start with maximum delay, cancel OK, rest 2305843009213693948
   wd_start with maximum delay, cancel OK, rest 2305843009213693948
   wdtest_recursive 1000000ns
   wd_start with maximum delay, cancel OK, rest 2305843009213693948
   wd_start with maximum delay, cancel OK, rest 2305843009213693948
   wd_start with maximum delay, cancel OK, rest 2305843009213693948
   wd_start with maximum delay, cancel OK, rest 2305843009213693948
   wdtest_recursive 1000000ns
   wdtest_recursive 1000000ns
   wdtest_recursive 1000000ns
   wdtest_recursive 1000000ns
   wdtest_recursive 1000000ns
   wdtest_recursive 1000000ns
   wdtest_recursive 1000000ns
   wdtest_recursive 1000000ns
   wdtest_recursive 1000000ns
   wdtest_recursive 1000000ns
   recursive wdog triggered 51 times, elapsed tick 102
   wdtest_recursive 10000000ns
   recursive wdog triggered 51 times, elapsed tick 102
   wdtest_recursive 10000000ns
   recursive wdog triggered 51 times, elapsed tick 102
   wdtest_recursive 10000000ns
   recursive wdog triggered 51 times, elapsed tick 102
   wdtest_recursive 10000000ns
   recursive wdog triggered 51 times, elapsed tick 102
   wdtest_recursive 10000000ns
   recursive wdog triggered 51 times, elapsed tick 102
   wdtest_recursive 10000000ns
   recursive wdog triggered 51 times, elapsed tick 102
   recursive wdog triggered 51 times, elapsed tick 102
   recursive wdog triggered 51 times, elapsed tick 102
   wdtest_recursive 10000000ns
   wdtest_recursive 10000000ns
   wdtest_recursive 10000000ns
   recursive wdog triggered 51 times, elapsed tick 102
   recursive wdog triggered 51 times, elapsed tick 102
   recursive wdog triggered 51 times, elapsed tick 102
   recursive wdog triggered 51 times, elapsed tick 102
   recursive wdog triggered 51 times, elapsed tick 102
   recursive wdog triggered 51 times, elapsed tick 102
   recursive wdog triggered 51 times, elapsed tick 102
   wdtest_recursive 10000000ns
   wdtest_recursive 10000000ns
   wdtest_recursive 10000000ns
   wdtest_recursive 10000000ns
   wdtest_recursive 10000000ns
   wdtest_recursive 10000000ns
   wdtest_recursive 10000000ns
   recursive wdog triggered 9 times, elapsed tick 99
   recursive wdog triggered 9 times, elapsed tick 99
   recursive wdog triggered 9 times, elapsed tick 99
   recursive wdog triggered 9 times, elapsed tick 99
   recursive wdog triggered 9 times, elapsed tick 99
   recursive wdog triggered 9 times, elapsed tick 99
   recursive wdog triggered 9 times, elapsed tick 99
   recursive wdog triggered 9 times, elapsed tick 99
   recursive wdog triggered 9 times, elapsed tick 99
   recursive wdog triggered 9 times, elapsed tick 99
   recursive wdog triggered 9 times, elapsed tick 99
   recursive wdog triggered 9 times, elapsed tick 99
   recursive wdog triggered 9 times, elapsed tick 99
   recursive wdog triggered 9 times, elapsed tick 99
   recursive wdog triggered 9 times, elapsed tick 99
   recursive wdog triggered 9 times, elapsed tick 99
   wdog_test end...
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        28       17
   mxordblk  7988b78  796ab78
   uordblks    18d6c     b10c
   fordblks  79c1e10  79cfa70
   
   user_main: round-robin scheduler test
   rr_test: Set thread priority to 1
   rr_test: Set thread policy to SCHED_RR
   rr_test: Starting first get_primes_thread
            First get_primes_thread: 595
   rr_test: Starting second get_primes_thread
            Second get_primes_thread: 596
   rr_test: Waiting for 10 time slices of each thread
            If RR scheduling is working, the threads run the same
            number of time slices
   get_primes_thread id=1 started, looking for primes < 30000, running 10 time 
slice(s)
   get_primes_thread id=2 started, looking for primes < 30000, running 10 time 
slice(s)
   get_primes_thread id=2 finished, 10 time slice(s), found 122809 primes
   get_primes_thread id=1 finished, 11 time slice(s), found 136087 primes
   rr_test: thread 1 ran 11 time slices, thread 2 ran 10
   rr_test: Done
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        17       17
   mxordblk  796ab78  796ab78
   uordblks     b10c     b10c
   fordblks  79cfa70  79cfa70
   
   user_main: barrier test
   barrier_test: Initializing barrier
   barrier_test: Thread 0 created
   barrier_func: Thread 0 started
   barrier_test: Thread 1 created
   barrier_func: Thread 1 started
   barrier_test: Thread 2 created
   barrier_func: Thread 2 started
   barrier_test: Thread 3 created
   barrier_func: Thread 3 started
   barrier_test: Thread 4 created
   barrier_func: Thread 4 started
   barrier_test: Thread 5 created
   barrier_func: Thread 5 started
   barrier_test: Thread 6 created
   barrier_func: Thread 6 started
   barrier_test: Thread 7 created
   barrier_func: Thread 7 started
   barrier_func: Thread 0 calling pthread_barrier_wait()
   barrier_func: Thread 1 calling pthread_barrier_wait()
   barrier_func: Thread 2 calling pthread_barrier_wait()
   barrier_func: Thread 3 calling pthread_barrier_wait()
   barrier_func: Thread 4 calling pthread_barrier_wait()
   barrier_func: Thread 5 calling pthread_barrier_wait()
   barrier_func: Thread 6 calling pthread_barrier_wait()
   barrier_func: Thread 7 calling pthread_barrier_wait()
   barrier_func: Thread 7, back with status=PTHREAD_BARRIER_SERIAL_THREAD (I AM 
SPECIAL)
   barrier_func: Thread 0, back with status=0 (I am not special)
   barrier_func: Thread 1, back with status=0 (I am not special)
   barrier_func: Thread 2, back with status=0 (I am not special)
   barrier_func: Thread 3, back with status=0 (I am not special)
   barrier_func: Thread 4, back with status=0 (I am not special)
   barrier_func: Thread 5, back with status=0 (I am not special)
   barrier_func: Thread 6, back with status=0 (I am not special)
   barrier_func: Thread 0 done
   barrier_func: Thread 7 done
   barrier_func: Thread 1 done
   barrier_test: Thread 0 completed with result=0
   barrier_func: Thread 2 done
   barrier_func: Thread 3 done
   barrier_func: Thread 4 done
   barrier_test: Thread 1 completed with result=0
   barrier_func: Thread 5 done
   barrier_func: Thread 6 done
   barrier_test: Thread 2 completed with result=0
   barrier_test: Thread 3 completed with result=0
   barrier_test: Thread 4 completed with result=0
   barrier_test: Thread 5 completed with result=0
   barrier_test: Thread 6 completed with result=0
   barrier_test: Thread 7 completed with result=0
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        17       17
   mxordblk  796ab78  7988b78
   uordblks     b10c     b10c
   fordblks  79cfa70  79cfa70
   
   user_main: scheduler lock test
   sched_lock: Starting lowpri_thread at 97
   sched_lock: Set lowpri_thread priority to 97
   sched_lock: Starting highpri_thread at 98
   sched_lock: Set highpri_thread priority to 98
   sched_lock: Waiting...
   sched_lock: PASSED No pre-emption occurred while scheduler was locked.
   sched_lock: Starting lowpri_thread at 97
   sched_lock: Set lowpri_thread priority to 97
   sched_lock: Starting highpri_thread at 98
   sched_lock: Set highpri_thread priority to 98
   sched_lock: Waiting...
   sched_lock: PASSED No pre-emption occurred while scheduler was locked.
   sched_lock: Finished
   
   End of test memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks        17       17
   mxordblk  7988b78  7988b78
   uordblks     b10c     b10c
   fordblks  79cfa70  79cfa70
   
   user_main: smp call test
   smp_call_test: Test start
   smp_call_test: Call cpu 0, nowait
   smp_call_test: Call cpu 0, wait
   smp_call_test: Call cpu 1, nowait
   smp_call_test: Call cpu 1, wait
   smp_call_test: Call cpu 2, nowait
   smp_call_test: Call cpu 2, wait
   smp_call_test: Call cpu 3, nowait
   smp_call_test: Call cpu 3, wait
   smp_call_test: Call multi cpu, nowait
   smp_call_test: Call in interrupt, wait
   smp_call_test: Call multi cpu, wait
   smp_call_test: Test success
   
   user_main: interrupt stack test
   intstack_test: CPU 0 used 728 of 2048
   intstack_test: CPU 1 used 312 of 2048
   intstack_test: CPU 2 used 336 of 2048
   intstack_test: CPU 3 used 336 of 2048
   intstack_test: Test success
   
   Final memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena     79dab7c  79dab7c
   ordblks         7       17
   mxordblk  79cdb78  7988b78
   uordblks     7cb4     b10c
   fordblks  79d2ec8  79cfa70
   user_main: Exiting
   ostest_main: Exiting with status 0
   nsh> qemu-system-arm: terminating on signal 15 from pid 352373 (python3)
   ```
   


-- 
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