Книга: Real-Time Concepts for Embedded Systems

5.4.3 Obtaining Task Information

5.4.3 Obtaining Task Information

Kernels provide routines that allow developers to access task information within their applications, as shown in Table 5.3. This information is useful for debugging and monitoring.

Table 5.3: Task-information operations.

Operation Description
Get ID Get the current task’s ID
Get TCB Get the current task’s TCB 

One use is to obtain a particular task’s ID, which is used to get more information about the task by getting its TCB. Obtaining a TCB, however, only takes a snapshot of the task context. If a task is not dormant (e.g., suspended), its context might be dynamic, and the snapshot information might change by the time it is used. Hence, use this functionality wisely, so that decisions aren’t made in the application based on querying a constantly changing task context.

Оглавление книги


Генерация: 1.063. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз