-
Notifications
You must be signed in to change notification settings - Fork 2k
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
core: define default flags #2761
Comments
For CREATE_STACKTEST, fix ps to show edit that the thread doesn't have that information. All other flags have intrinsic defaults, e.g., CREATE_STACKTEST and CREATE_SLEEPING are opt-in, CREATE_WITHOUT_YIELD is opt-out. No need to waste code & flash for another place to store defaults. |
I don't get the proposal. @authmillenon, can you rephrase, please? |
It was more or less @haukepetersen's idea and this was what I gathered from him. Maybe he can do that? |
If I understand correctly, @haukepetersen wondered why it's pktpuf thread always showed the full stacksize when watched with ps. The problem was that the thread was not created with the Now @authmillenon proposed to introduce default thread creation flags, so that i.e., |
I think this would be beneficial because one could save the cost of CREATE_STACKTEST in production environments. |
Sounds good. |
Maybe we can remove this from the flags altogether and just ifdef the section of the thread creation function? I can't really think of a situation where one would want to turn this off for individual threads only. |
This -> CREATESTACKTEST |
👍 |
👍 @kaspar030, I guess you've initially implemented this. Was there a rationale behind that? |
Well, CREATE_STACKTEST makes the thread creation write something to the entire stack. As that is time-consuming, there was no "ps" and it's O(n), I made it optional. Also there might be (future) use-cases where this is not needed / too time-consuming:
Mind that this is only used by |
The rationale provided by @kaspar030 seems sound to me. However,
is also not possible without storing the information somewhere in the tcb which is also definitely not desirable. Hence, I would tend to close this as wontfix. Any objections? |
no :) |
Not going to work on this any time soon. |
Ok to close this (maybe with memo flag)? |
I'm fine. IIRC @haukepetersen was the one originally proposing the idea. What has he to say? |
Is this still a known issue? |
Why was it in the known issues anyway? This is a feature proposal, not a bug... |
#2711 (comment) revealed that it can be problematic starting a thread without
CREATE_STACKTEST
when trying to debug. #2758 (comment) suggested to create a macro for default flags (if there are more thanCREATE_STACKTEST
these can be added to).The text was updated successfully, but these errors were encountered: