Skip to content
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

Merged
merged 1 commit into from
Nov 4, 2020

Conversation

Harvie
Copy link
Contributor

@Harvie Harvie commented Nov 4, 2020

This PR exports useful defines to header file.
For more details see: cesanta/mongoose-os#554

#define MGOS_EARLY_WDT_TIMEOUT 30 /* seconds */
#endif

#if CS_PLATFORM == CS_P_ESP32
Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor Author

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.

@rojer rojer merged commit f4b5ba5 into mongoose-os-libs:master Nov 4, 2020
@rojer
Copy link
Contributor

rojer commented Nov 4, 2020

thanks!

@Harvie
Copy link
Contributor Author

Harvie commented Nov 4, 2020

Thank you too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants