-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export FreeRTOS task-related constants to header file. #2
Conversation
#define MGOS_EARLY_WDT_TIMEOUT 30 /* seconds */ | ||
#endif | ||
|
||
#if CS_PLATFORM == CS_P_ESP32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leave this in the source file, it not really tunable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you talking about the MGOS_EARLY_WDT_TIMEOUT or CS_PLATFORM ?
It's not meant to be tuned... I just want to be able to know the value...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
STACK_SIZE_UNIT. it's not really a tunable, it is hardcoded in freertos port and we just have to deal with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CS_PLATFORM is needed to determine STACK_SIZE_UNIT, which i need.
But i don't really need MGOS_EARLY_WDT_TIMEOUT, but is there reason to conceal it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, you need STACK_SIZE_UNIT for your code... fair enough.
then let's keep it public, but please rename it to MGOS_TASK_STACK_SIZE_UNIT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my module i have code similar to this from mgos_freertos.c
and it does need STACK_SIZE_UNIT see:
xTaskCreateStatic(mgos_task, "mgos",
MGOS_TASK_STACK_SIZE_BYTES / STACK_SIZE_UNIT, NULL,
MGOS_TASK_PRIORITY, mgos_task_stack, &mgos_task_tcb);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rename it to MGOS_TASK_STACK_SIZE_UNIT
should have seen this coming :) i have pushed fixed version now.
thanks! |
Thank you too. |
This PR exports useful defines to header file.
For more details see: cesanta/mongoose-os#554