ChibiOS/NIL  4.1.0
nil_os_instance Struct Reference

System data structure. More...

#include <ch.h>

Collaboration diagram for nil_os_instance:
Collaboration graph

Data Fields

thread_tcurrent
 Pointer to the running thread. More...
 
thread_tnext
 Pointer to the next thread to be executed. More...
 
volatile systime_t systime
 System time. More...
 
systime_t lasttime
 System time of the last tick event. More...
 
systime_t nexttime
 Time of the next scheduled tick event. More...
 
cnt_t isr_cnt
 ISR nesting level. More...
 
cnt_t lock_cnt
 Lock nesting level. More...
 
const char *volatile dbg_panic_msg
 Panic message. More...
 
thread_t threads [CH_CFG_MAX_THREADS+1]
 Thread structures for all the defined threads. More...
 

Detailed Description

System data structure.

Note
This structure contain all the data areas used by the OS except stacks.

Definition at line 553 of file ch.h.

Field Documentation

◆ current

◆ next

thread_t* nil_os_instance::next

Pointer to the next thread to be executed.

Note
This pointer must point at the same thread pointed by current or to an higher priority thread if a switch is required.

Definition at line 563 of file ch.h.

Referenced by chSchDoPreemption(), and chSysInit().

◆ systime

volatile systime_t nil_os_instance::systime

System time.

Definition at line 568 of file ch.h.

Referenced by chSysTimerHandlerI().

◆ lasttime

systime_t nil_os_instance::lasttime

System time of the last tick event.

Definition at line 574 of file ch.h.

Referenced by chSchGoSleepTimeoutS().

◆ nexttime

systime_t nil_os_instance::nexttime

Time of the next scheduled tick event.

Definition at line 578 of file ch.h.

Referenced by chSchGoSleepTimeoutS().

◆ isr_cnt

◆ lock_cnt

◆ dbg_panic_msg

const char* volatile nil_os_instance::dbg_panic_msg

Panic message.

Note
This field is only present if some debug options have been activated.
Accesses to this pointer must never be optimized out so the field itself is declared volatile.

Definition at line 598 of file ch.h.

Referenced by chSysHalt().

◆ threads

thread_t nil_os_instance::threads[CH_CFG_MAX_THREADS+1]

Thread structures for all the defined threads.

Definition at line 603 of file ch.h.

Referenced by chSchDoPreemption(), chSchGoSleepTimeoutS(), chSchReadyI(), chSysInit(), chSysTimerHandlerI(), chThdCreateI(), chThdExit(), nil_find_thread(), and nil_ready_all().