Comments (6)
That is beautiful
from crect.
Testing data structure for holding the required data https://godbolt.org/g/enyxv9
from crect.
Found a constant-time way with a 1 bit bool-like lookup table, tested here https://godbolt.org/g/ADuL9d
from crect.
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 crect::job
template (true
to check all locks and false
to assume that the user knows he is doing)
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)
from crect.
Hi!
For now I was planning to just have a CRECT_DEBUG
flag, which will be connected to the normal NDEBUG
flag if the debug flag is not set manually.
I also see your point on job per job basis but I will not guarantee it for the first implementation.
While it is not impossible or even problematic, the question comes to how to propagate it well through the system - and how you recommended with a true
/ false
would probably be a good way of doing it!
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 lock
can be made in a completely unrelated job
, and I have to figure out how to catch this.
Else, it can be as you said, have it for only "local debug" while normally utilizing the global debug flag.
And thanks for watching the video and the kind comment! :) I really hope someone will find this as useful as I do.
But I really need to spend some time and make more tutorials...
from crect.
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> >();
from crect.
Related Issues (17)
- Cortex-M0 support HOT 1
- Add more tutorials HOT 3
- Add message passing between jobs
- Make to pend/async can be done using the function names
- Fix claim to use a reference wrapper
- Add a way to have resources have state, store within crect
- Split resource and job definitions into the external (user) and implementation
- Compatibility / Interop with other RTOS HOT 1
- Docs needed
- Make the NVIC init merged into minimal set of operations, not one operation per job. HOT 1
- Add license header to all files HOT 1
- Add support for memory mapped peripherals as resources HOT 1
- Test the Cortex-M0 support extensively / add examples for Cortex-M0 HOT 2
- Add a crect system halt function HOT 1
- Add SLEEPONEXIT
- Add fix for Cortex-M7 Errata HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crect.