-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add a debug mode #2
Comments
Testing data structure for holding the required data https://godbolt.org/g/enyxv9 |
Found a constant-time way with a 1 bit bool-like lookup table, tested here https://godbolt.org/g/ADuL9d |
How would you turn on this theoretical debug mode......would it be some sort of macro that you turn on and off......or would it be an extra parameter that you pass into the I like the idea of having it on a job by job basis because then you can check for errors on any jobs that you are working on, but would not slow the whole system down (not that it would slow it down tremendously......but you know) Any ways......just looking in on the repository (I saw the embo++ youtube video) and I love this project (the crect library in general) |
Hi! For now I was planning to just have a I also see your point on job per job basis but I will not guarantee it for the first implementation. I will have a look into it to see if I can infer it on a job level bases, but the issue I see is that a And thanks for watching the video and the kind comment! :) I really hope someone will find this as useful as I do. |
After some discussions with the Rust implementors of the same scheduler, there is a way to get the debug to happen at compile time, no need for runtime checks! More or less a job will be redefined to take a metaobject which holds the resources which is allowed to be taken as (straw-man syntax): template <typename R>
void job
{
// Claiming resource
R::claim<Rled>(
// ...
);
} While in the vector table generation, the metaobject is provided (based on the job/resource analysis): funptr my_ptr = job< crect::get_allowed_resources<job> >(); |
That is beautiful |
Add a debug mode for lock / claim / unique_lock, use IPSR to check that the ISR number is allowed to take the resource.
The text was updated successfully, but these errors were encountered: