kernel: don't use typedef for enums or non-opaque structs
This commit is contained in:
@@ -8,18 +8,18 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum cpu_flags {
|
||||
enum cpu_flags {
|
||||
CPU_ONLINE = 0x01u,
|
||||
} cpu_flags_t;
|
||||
};
|
||||
|
||||
typedef struct cpu_data {
|
||||
cpu_flags_t c_flags;
|
||||
struct cpu_data {
|
||||
enum cpu_flags c_flags;
|
||||
unsigned int c_id;
|
||||
unsigned int c_preempt_count;
|
||||
|
||||
thread_t *c_current_thread;
|
||||
runqueue_t c_rq;
|
||||
} cpu_data_t;
|
||||
struct thread *c_current_thread;
|
||||
struct runqueue c_rq;
|
||||
};
|
||||
|
||||
/* maximum number of processor cores that the kernel can support.
|
||||
TODO move to build config option */
|
||||
@@ -27,8 +27,8 @@ typedef struct cpu_data {
|
||||
|
||||
#define this_cpu() (ml_cpu_block_get_id(ml_this_cpu()))
|
||||
|
||||
extern cpu_data_t *get_this_cpu(void);
|
||||
extern void put_cpu(cpu_data_t *cpu);
|
||||
extern struct cpu_data *get_this_cpu(void);
|
||||
extern void put_cpu(struct cpu_data *cpu);
|
||||
|
||||
extern void cpu_set_available(unsigned int cpu_id);
|
||||
extern void cpu_set_online(unsigned int cpu_id);
|
||||
|
||||
Reference in New Issue
Block a user