Code Monkey home page Code Monkey logo

solariun / corepartition Goto Github PK

View Code? Open in Web Editor NEW
19.0 5.0 5.0 893 KB

Universal Cooperative Multithread Lib with real time Scheduler that was designed to work, virtually, into any modern micro controller or Microchip and, also, for user space applications for modern OS (Mac, Linux, Windows) or on FreeRTOS as well. Supports C and C++

License: MIT License

C 10.38% Makefile 1.58% Shell 0.11% Python 1.34% HTML 75.73% CSS 4.67% JavaScript 6.18%
thread c cpp universal arduino windows osx spressif arm avr

corepartition's People

Contributors

solariun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

corepartition's Issues

Create SmartLock

This lock will behave like a shared lock, with lock and shared lock, implementing multiple read one write principal.

  • Must be implemented using VariableLock to control process
  • Lock can only be granted once all shared locks has been unlocked
  • After a lock is request, no new shared lock acquisition, and will wait all active one to be unlocked.
  • Scheduler must detect FULL-SYSTEM-DEADLOCK

Convert StachOverflowHandler callback to weak function

  • use #pragma weak instead of atribute
  • Default messages on platform with DEBUG and printf on.
  • Implement TRACE for auto-disabling on non compatible platforms

Be aware: CorePartition_SetStackOverflowHandler will be retired since Cpx_StackOverflowHandler will be always available as weak function to be overflown by C or C++

Add stack memory pages based on global or stack memory allocation.

The idea is to provide CreateStaticThread that instead of providing the size of a stack, the programmer can provide a array that will be used as stack.

  • Minimal impact to CoreThread structure
  • Add a 8 bits data to signify stack type, this will control when StopThread should release the memory.

Create VariableLock functionality

This lock works like a semaphore, the programmer will lock using wait() and will be unlocked (one only or all) on notify

  • VariableLockWait function
  • VariableLockNotifyOne function
  • VariableLockNotifyAll function
  • The lock controller will be any variable pointer casted to (void*), the size_t value will be used in the context controller as the variable lock label, making any variable a lock.
  • Additionally, on notify, the programmer can propagate a size_t value to all way locks, giving meaning to the notification and, also, turning it into a IPC
  • The process will be controlled by the scheduler, so a new thread status must be created and the scheduler must comply with it.

Add TRACE, NOTRACE, YYTRACE, VERIFY to the project

Add minimal traceability functionality

  • Only fully enable on DEBUG
  • YYTRACE could be enable on no -D__DEGUB__
  • Detect printf functionality, if possible
  • NOTRACE, TRACE when deactivated must not be compiled or present on the bin/executable file.

Documentation

For 2.7 it is crucial to entirely redesign the documentation

  • re-brand the document to CoreOS, clear sessions and examples for IPC, Smart locks, timing.

  • Full function documentation.

  • Re organize all examples and add clear schematics for arduino community to replicate

  • dedicate a session to talk about arduino compatibility

  • Clearly explain it is for single core processor but can be used on any processor with that limitation.

  • Clearly explain it can run on Linux, Mac and Windows as a thread lib.

  • A session explaining Cooperative threads

  • A session for Dropping compatibility

  • Simplify the read me on GitHub

Reinforce execution

Add clear execution state check, using nRunningThreads or any other mean always making sure not to inflate flash or ram. This is crucial.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.