Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/cpu.h

    rbd01a4e rd0c82c5  
    4242#include <arch/context.h>
    4343
    44 #define CPU_STACK_SIZE  STACK_SIZE
     44#define CPU_STACK_SIZE  STACK_SIZE
    4545
    4646/** CPU structure.
     
    4949 */
    5050typedef struct cpu {
    51         SPINLOCK_DECLARE(lock);
    52 
     51        IRQ_SPINLOCK_DECLARE(lock);
     52       
    5353        tlb_shootdown_msg_t tlb_messages[TLB_MESSAGE_QUEUE_LEN];
    5454        size_t tlb_messages_count;
    5555       
    5656        context_t saved_context;
    57 
     57       
    5858        atomic_t nrdy;
    5959        runq_t rq[RQ_COUNT];
    6060        volatile size_t needs_relink;
    61 
    62         SPINLOCK_DECLARE(timeoutlock);
     61       
     62        IRQ_SPINLOCK_DECLARE(timeoutlock);
    6363        link_t timeout_active_head;
    64 
    65         size_t missed_clock_ticks;      /**< When system clock loses a tick, it is recorded here
    66                                              so that clock() can react. This variable is
    67                                              CPU-local and can be only accessed when interrupts
    68                                              are disabled. */
    69 
     64       
     65        /**
     66         * When system clock loses a tick, it is
     67         * recorded here so that clock() can react.
     68         * This variable is CPU-local and can be
     69         * only accessed when interrupts are
     70         * disabled.
     71         */
     72        size_t missed_clock_ticks;
     73       
     74        /**
     75         * Processor cycle accounting.
     76         */
    7077        bool idle;
    71         uint64_t idle_ticks;
    72         uint64_t busy_ticks;
    73 
     78        uint64_t last_cycle;
     79        uint64_t idle_cycles;
     80        uint64_t busy_cycles;
     81       
    7482        /**
    7583         * Processor ID assigned by kernel.
    7684         */
    77         unsigned int id;
     85        size_t id;
    7886       
    7987        bool active;
    80         int tlb_active;
    81 
     88        bool tlb_active;
     89       
    8290        uint16_t frequency_mhz;
    8391        uint32_t delay_loop_const;
    84 
     92       
    8593        cpu_arch_t arch;
    86 
     94       
    8795        struct thread *fpu_owner;
    8896       
     
    100108extern void cpu_arch_init(void);
    101109extern void cpu_identify(void);
    102 extern void cpu_print_report(cpu_t *m);
     110extern void cpu_print_report(cpu_t *);
    103111
    104112#endif
Note: See TracChangeset for help on using the changeset viewer.