Nucleus
Barry System headers (remove libc dependency) 18495cf (3 years, 2 months ago)diff --git a/include/nucleus/cpu.h b/include/nucleus/cpu.h index 2a8c52b..cb41a28 100644 --- a/include/nucleus/cpu.h +++ b/include/nucleus/cpu.h @@ -1,8 +1,8 @@ #ifndef _NUCLEUS_CPU_H #define _NUCLEUS_CPU_H -#include <stdint.h> #include <stddef.h> +#include <stdint.h> #include <nucleus/types.h> typedef unsigned int cpu_t; @@ -41,7 +41,7 @@ extern Processor *cpus[]; extern size_t ncpus; extern int apic; #define for_each_cpu(c) for (cpu_t __i_ ## c = 0; ((c) = cpus[__i_ ## c]) && \ - __i_ ## c < ncpus; __i_ ## c++) + ((__i_ ## c) < ncpus); (__i_ ## c)++) extern uintptr_t lapicPtr, ioapicPtr; #define LAPIC(off) (*((uint32_t *) ((uint32_t) lapicPtr + (off))))