Skip to content

Broken thread priority sign #7

@diggit

Description

@diggit

Hi,
Zephyr uses negative priority values for cooperative threads, like system WQ. GDB sees those as interpreted as u8

info threads
  Id   Target Id                                     Frame 
  2    Thread 536900552 (main NOT STARTED PRIO 0)    __ISB () at ...
  3    Thread 536900288 (idle UNKNOWN PRIO 15)       0x00040306 in arch_cpu_idle () at ...
  4    Thread 536899928 (MPSL Work PENDING PRIO 246) arch_swap (key=key@entry=0x0) at ...
* 5    Thread 536900816 (sysworkq RUNNING PRIO 255)  shall_fail () ...
  6    Thread 536881856 (BT LW WQ PENDING PRIO 10)   arch_swap ...

255 for WQ instead of it's real value of -1 etc.

I am not really familiar with jlink RTOS api, but I think on the line 567 the format specifier should be hhd instead of hhu for signed 8 bit integer (i8).

If jlink accepts only non negative priorities and this is intended behavior, it should be noted somewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions