1.Remove the particularly costly parts such as the path of the object, reduce the system kernel, and support fine-grained kernel cropping. Compatible with low-capacity products.
2.Support low-power mode.
1.Fix the error tick >= (MR_TICK_MAX / 2) in the ktimer parameter check. The highest bit is used to mark the period, causing periodic timers to be unusable.
1.New parameter checking has been added. Fixed the issue where an empty string ("", that is, only the end character) was passed in. The parameter checking of kobject failed to detect the problem, resulting in data errors.
1.The brand-new IRQ delay mechanism realizes delay processing by using the work queue. It is convenient to synchronize time-consuming operations to the thread environment for use. If in a bare-metal environment, the delay processing can be synchronized to the soft interrupt by using a soft interrupt.
1.Kernel initialization abandons the section feature and uses it only for user initialization.
2.The kernel work queue is optimized, and the transfer of the work queue in the threading environment can be completed by obtaining the semaphore in the hook and releasing the semaphore by the wakeup node.
1.Added a work queue that supports instant and delayed start of multithreading (can be used without os, multithreading needs to create its own thread) to improve concurrency.
2.By adding parent2 to save the parent node, fixed an issue where forgetting the parent object changed when looking for an object, resulting in the wrong parent object being put when exiting.
1.There is a delay in getting the parent when the kernel object is operating, making it possible to be insecure for some time. Fix this by adjusting the timing of access to the parent.
1.Added attributes of kernel objects. You can directly manipulate the attributes supported by objects by running show and store.
2.The kernel timer has three attributes: tick,mode, and status. Because of the danger of OS operations, attributes are not supported by kernel OS objects.
3.Kernel printf has a bug when printing strings, an incorrect comparison condition causes the print to be missing content.
1.Kernel threads are supported by static stack creation, which is not reusable (i.e. secondary initialization) due to the release of threads in different os.
1.Threads that fit RT-Thread and FreeRTOS.
2.Thread deletion and suspension support treats null as the current thread.
3.Supports automatic handling of initialization status. If the kernel is not initialized when the user initializes, the kernel is automatically initialized.
Previous versions of the os memory inline within the kthread, making the adaptation of different os more complicated (because each thread deletion mechanism is different, the inline memory needs to wait until the thread is recycled before release); Kernel threads are now simplified, and the memory of thread objects remains in mr-X, while the memory of threads is managed by the os.
1.The default thread is already started when the takeover takes place, so you need to increase the run time reference count after the takeover is successful.
1.The level of spin lock required for kernel operation may be different in different environments, so separate the kernel from the application spin lock.
2.Optimize the lifecycle management of kThreads by creating a lifecycle for the runtime and releasing it in cleanup (instead of exit).
1.Was not satisfied with the original kernel object implementation, so it was refactored.
2.Due to the structure, the rest also needs to be reconstructed.
1.It was reconstructed because the original project structure was not satisfied.
2.Developing without an OS was too difficult, so a separate stack coroutine was added.
Class functions are functions used by users, and class interfaces are interfaces used for class abstraction.
At instantiation time, the interface is implemented through constructor injection.
A class system is introduced to implement OOPC-like functions(original class is temporarily removed).
Classes support automatic construction and destruction. Scope control is achieved by importing types.
Tool restrictions the minimum Python version is 3.10.0(type annotation syntax restrictions)
This change adds a new method to the class that allows checking whether a given class is a subclass of the base class.
The new rule states that the private data size of the subclass must be larger than that of the base class.