Ucos ii readiness group and readiness table

Source: Internet
Author: User

In ucos ii, readiness groups and readiness tables are basic concepts. Understanding the meaning is crucial to understanding task management and event management of ucos ii.

A ready group is essentially an 8-bit unsigned variable. Each bit of the ready group variable indicates whether there are ready tasks in a group of eight tasks. UCOS gives this variable a special meaning: when its bit0 is 1, it indicates the task 0 ~ At least one task in task 7 is ready. When its bit1 value is 1, the task 8 ~ At least one of task 15 is ready... when its bit7 value is 1, it indicates task 56 ~ At least one of task 63 is ready. Which or which of the eight tasks in a group are ready must be determined based on the ready table.

A ready table is essentially an 8-bit unsigned variable. One bit of any variable is 1, which indicates that the task is ready. Assume that the eight variables in the ready table are named T1-T8. When the first bit of T1 is bit0 1, the task 0 is ready. When the eighth bit of T1 is 1, it indicates that task 7 is ready. When the first bit0 of T8 is 1, the task 56 is ready ......

Ucos ii supports a maximum of 64 tasks. Task numbers have the highest priority from 0.

As for the ing table and ing table, it is a method of changing the space time. By directly querying the table to replace the calculation, you can quickly obtain the Group Number of the task with the highest priority in the ready task, and the column position in the ready table.

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.