SST-Structure Analysis of super simple task scheduler

Source: Internet
Author: User

SST-Structure Analysis of super simple task scheduler
SST (Super Simple Task) is a Super Simple Task scheduler based on Task priority, preemptible, event-driven, RTC, and single stack. It is based on the idea of Rober Ward, miro Samek is implemented by re-programming in C. It is the basic idea of QK in QP. QK, the method for processing state machine events (QEP), the task registration and event storage and distribution functions (QF), the serial port debugging function (QSpy), and model-driven development (QM, it becomes QP. In 2015, QP won the "Embedded Computing Design" top prize. 1. SST hierarchy 2. the overall structure of SST sends an event (event generation) SST_post (target task priority prio, signal sig, parameter para), sends the event to the event queue corresponding to the prio task, and sets the status bit of the queue to 1. Scheduling (event consumption) SST_schedule _ (void), scheduling task function, when the queue is empty, clear the 0 queue status bit. The queue status table sets 1 to SST_readySet _ | = tcb-> mask _. When an event is placed in the queue, the corresponding position is 1. The queue status table clears 0 SST_readySet _ & = ~ When no event exists in the tcb-> mask _ queue, the corresponding bit is cleared by 0. 3.SST TCB structure 4. send event SST_post () flowchart 5. SST_schedule () flowchart 6. header file relationships 7. access the interrupt macro, exit the use of the interrupt macro, and interrupt

Macro # define SST_ISR_ENTRY (pin _, isrPrio _) do {\ (pin _) = SST_currPrio _; \/* 1. save the priority of the interrupted task (current priority) to the pin */SST_currPrio _ = (isrPrio _); \/* 2. set isrPrio of ISR to the current priority */SST_INT_UNLOCK (); \/* 3. exit macro for interrupt */} while (0) interrupt # define SST_ISR_EXIT (pin _, EOI_command _) do {\ SST_INT_LOCK (); \/* 1. guanzhong disconnection */(EOI_command _); \/* 2. end current interrupt */SST_currPrio _ = (pin _); \/* 3. the priority of the task before the restoration is the current task */SST_schedule _ (); \/* 4. macro example for scheduling */} while (0) interrupt // keyboard interrupt ISR static void interrupt kbdISR () {uint8_t pin; uint8_t key = inport (0x60 ); // get the key value displayPreemptions (SST_currPrio _, KBD_ISR_PRIO); // for testing, display the number of preemptible SST_ISR_ENTRY (pin, KBD_ISR_PRIO);/* 1. enter interrupt */SST_post (KBD_TASK_PRIO, KBD_SIG, key);/* 2. send an event to the KbdTask */SST_ISR_EXIT (pin, outportb (0x20, 0x20);/* 3. exit interrupted *}

 

In conclusion, if Rober Ward's paper is compared to an inconspicuous seed, the SST of Miro Samek is a small sapling, while the QP of Miro Samek has grown into a towering tree, which has grown for ten years, in 2015, QP won the "Embedded Computing Design" top prize.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.