Skip to content

uxTaskGetStackHighWaterMark() return type too small #27

Closed
@Floessie

Description

@Floessie

Hi Phillip,

I just stumbled upon the return type of uxTaskGetStackHighWaterMark(): It's UBaseType_t, and that is defined as unsigned char in this port. The stack size is provided as unsigned short words to xTaskCreate(), thus theoretically 64kB are possible here.

Wouldn't it be better to patch tasks.c to make it return unsigned short instead of UBaseType_t, as prvTaskCheckFreeStackSpace() correctly returns a uint16_t? Otherwise uxTaskGetStackHighWaterMark() will return a misguiding value.

Thanks,
Flössie

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions