Skip to content

Sys clock - ticks_t definition for 32bit unsigned and 64bit signed breaks Z_TICK_ABS #80974

@optical-o

Description

@optical-o

Strangely, the two types are changing from unsigned to signed. I have encountered this in a single-threaded application. I'm not sure if it impacts anything else but there are probably mistakes in more places because of this not just in the single-threaded version. The usage of Z_TICK_ABS assumes that the type is signed.

The 32bit unsinged variant breaks Z_TICK_ABS in nothread.c so that the result of Z_TICK_ABS cannot be lower than zero because of the unsigned 32bit integer resulting in k_sleeping being always set virtually forever.

Metadata

Metadata

Labels

area: KernelbugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions