Changes in kernel/generic/include/cpu.h [d23712e:f3dbe27] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/cpu.h
rd23712e rf3dbe27 44 44 #include <arch.h> 45 45 46 #define CPU (CURRENT->cpu) 47 #define CPU_LOCAL (&CPU->local) 48 49 /** 50 * Contents of CPU_LOCAL. These are variables that are only ever accessed by 51 * the CPU they belong to, so they don't need any synchronization, 52 * just locally disabled interrupts. 53 */ 54 typedef struct cpu_local { 55 /** 56 * When system clock loses a tick, it is 57 * recorded here so that clock() can react. 58 */ 59 size_t missed_clock_ticks; 60 61 uint64_t current_clock_tick; 62 uint64_t preempt_deadline; /* < when should the currently running thread be preempted */ 63 uint64_t relink_deadline; 64 65 /** 66 * Stack used by scheduler when there is no running thread. 67 * This field is unchanged after initialization. 68 */ 69 uint8_t *stack; 70 71 /** 72 * Processor cycle accounting. 73 */ 74 bool idle; 75 uint64_t last_cycle; 76 77 context_t scheduler_context; 78 79 struct thread *prev_thread; 80 } cpu_local_t; 46 #define CPU CURRENT->cpu 81 47 82 48 /** CPU structure. … … 97 63 98 64 /** 65 * When system clock loses a tick, it is 66 * recorded here so that clock() can react. 67 * This variable is CPU-local and can be 68 * only accessed when interrupts are 69 * disabled. 70 */ 71 size_t missed_clock_ticks; 72 73 /** Can only be accessed by the CPU represented by this structure when interrupts are disabled. */ 74 uint64_t current_clock_tick; 75 uint64_t preempt_deadline; /* < when should the currently running thread be preempted */ 76 uint64_t relink_deadline; 77 78 /** 99 79 * Processor cycle accounting. 100 80 */ 81 bool idle; 82 uint64_t last_cycle; 101 83 atomic_time_stat_t idle_cycles; 102 84 atomic_time_stat_t busy_cycles; … … 121 103 _Atomic(struct thread *) fpu_owner; 122 104 123 cpu_local_t local; 105 /** 106 * Stack used by scheduler when there is no running thread. 107 */ 108 uint8_t *stack; 124 109 } cpu_t; 125 110
Note:
See TracChangeset
for help on using the changeset viewer.