Add more clang-tidy checks.
This adds all the generic checks. There are some more project specific
ones that could be selected but this is a good start and has already
found some lint errors.
Change-Id: I7bb9d9347f5270862c2ff586eb7c86feead9e4bb
diff --git a/inc/cpu.h b/inc/cpu.h
index 0dc561b..58df21d 100644
--- a/inc/cpu.h
+++ b/inc/cpu.h
@@ -17,24 +17,24 @@
/* TODO: Update alignment such that cpus are in different cache lines. */
struct cpu {
- struct spinlock lock;
-
struct vcpu *current;
+ /* CPU identifier. Doesn't have to be contiguous. */
+ size_t id;
+
+ /* Pointer to bottom of the stack. */
+ void *stack_bottom;
+
/*
* Enabling/disabling irqs are counted per-cpu. They are enabled when
* the count is zero, and disabled when it's non-zero.
*/
uint32_t irq_disable_count;
+ struct spinlock lock;
+
/* Determines whether or not the cpu is currently on. */
bool is_on;
-
- /* CPU identifier. Doesn't have to be contiguous. */
- size_t id;
-
- /* Pointer to bottom of the stack. */
- void *stack_bottom;
};
void cpu_module_init(void);
@@ -47,7 +47,7 @@
void cpu_off(struct cpu *c);
void vcpu_init(struct vcpu *vcpu, struct vm *vm);
-void vcpu_on(struct vcpu *v);
-void vcpu_off(struct vcpu *v);
+void vcpu_on(struct vcpu *vcpu);
+void vcpu_off(struct vcpu *vcpu);
#endif /* _CPU_H */