]> git.corax.cc Git - corax/commitdiff
Fix curly brackets
authorMatthias Kruk <m@m10k.eu>
Mon, 16 Sep 2019 04:45:10 +0000 (13:45 +0900)
committerMatthias Kruk <m@m10k.eu>
Mon, 16 Sep 2019 04:45:10 +0000 (13:45 +0900)
kernel/arch/cpu.c
kernel/arch/debug.c
kernel/arch/interrupt.c
kernel/arch/paging.c
kernel/core/main.c

index 716483063535fe7d2c0fab2723ee143d8a9e0b9c..86fe61c3f9106a4a4bc485bdaf70515b9e98e258 100644 (file)
@@ -26,14 +26,16 @@ struct cpu _cpu[CONFIG_SMP_CPUS];
 
 #if defined(CONFIG_SMP) && CONFIG_SMP_CPUS > 1
 
-int cpu_get_id(void) {
+int cpu_get_id(void)
+{
     /* FIXME: implement this properly */
     return(0);
 }
 
 #endif /* CONFIG_SMP */
 
-void _segment_descriptor_set(segment_descriptor_t *sd, u32_t type, u32_t base, u32_t limit, u32_t dpl) {
+void _segment_descriptor_set(segment_descriptor_t *sd, u32_t type, u32_t base, u32_t limit, u32_t dpl)
+{
         sd->sd_high = type;
         switch(type) {
                 case SD_TYPE_CODE:
@@ -60,7 +62,8 @@ void _segment_descriptor_set(segment_descriptor_t *sd, u32_t type, u32_t base, u
         return;
 }
 
-void cpu_debug(void) {
+void cpu_debug(void)
+{
     u32_t i;
 
     for(i = 0; i < 256; i++) {
index 04672658896f094d847bc6d3a0c57863260d814a..3793a3c2984bfd4466ed8bd157dd0a2946b5218d 100644 (file)
@@ -61,7 +61,8 @@ static i32_t vga_offset = VGA_BUFFER_SIZE;
 #define VGA_SET_FONT(c)         vga_attrs = (vga_attrs & 0xf0ff) | VGA_FONT(c)
 #define VGA_SET_BACKGROUND(c)   vga_attrs = (vga_attrs & 0x0fff) | VGA_BACKGROUND(c)
 
-i64_t _i64div(i64_t dividend, i64_t divisor) {
+i64_t _i64div(i64_t dividend, i64_t divisor)
+{
     i64_t quotient;
     int sign;
 
@@ -90,7 +91,8 @@ i64_t _i64div(i64_t dividend, i64_t divisor) {
     return(sign > 0 ? quotient : -quotient);
 }
 
-i64_t _i64mod(i64_t dividend, i64_t divisor) {
+i64_t _i64mod(i64_t dividend, i64_t divisor)
+{
     if(divisor == 0) {
         PANIC("Can't divide by zero");
     }
@@ -110,7 +112,8 @@ i64_t _i64mod(i64_t dividend, i64_t divisor) {
     return(dividend);
 }
 
-u64_t _u64div(u64_t dividend, u64_t divisor) {
+u64_t _u64div(u64_t dividend, u64_t divisor)
+{
     u64_t quotient = 0;
 
     if(divisor == 0) {
@@ -124,7 +127,8 @@ u64_t _u64div(u64_t dividend, u64_t divisor) {
     return(quotient);
 }
 
-u64_t _u64mod(u64_t dividend, u64_t divisor) {
+u64_t _u64mod(u64_t dividend, u64_t divisor)
+{
     if(divisor == 0) {
         PANIC("Can't divide by zero");
     }
@@ -136,7 +140,8 @@ u64_t _u64mod(u64_t dividend, u64_t divisor) {
     return(dividend);
 }
 
-void* memset(void *dst, int val, u32_t n) {
+void* memset(void *dst, int val, u32_t n)
+{
     char *ptr;
 
     ptr = dst;
@@ -146,7 +151,8 @@ void* memset(void *dst, int val, u32_t n) {
     return(dst);
 }
 
-void* memcpy(void *dst, const void *src, u32_t n) {
+void* memcpy(void *dst, const void *src, u32_t n)
+{
     char *d;
     const char *s;
 
@@ -158,7 +164,8 @@ void* memcpy(void *dst, const void *src, u32_t n) {
     return(dst);
 }
 
-static void _putchar(int c) {
+static void _putchar(int c)
+{
     if(c == '\n') {
         vga_offset += VGA_BUFFER_COLS - (vga_offset % VGA_BUFFER_COLS);
     } else {
@@ -174,7 +181,8 @@ static void _putchar(int c) {
     return;
 }
 
-int dbg_printf(const char *format, ...) {
+int dbg_printf(const char *format, ...)
+{
     int n;
     char c;
     char size;
@@ -461,7 +469,8 @@ int dbg_printf(const char *format, ...) {
     return(n);
 }
 
-void dbg_panic(const char *func, const char *file, i32_t line, const char *msg) {
+void dbg_panic(const char *func, const char *file, i32_t line, const char *msg)
+{
     /* vga_attrs = 0x0400; *//* VGA_FONT(VGA_RED) | VGA_BACKGROUND(VGA_BLACK); */
     VGA_SET_FONT(VGA_RED);
 
index 3eee8efc28f55eb646d1eac07d43e5110273fbaf..e1ae81c69a912a21e3afbaecfb62239077cfa756 100644 (file)
@@ -110,7 +110,8 @@ int _exc_handle(stack_frame_t ctx)
     return(0);
 }
 
-int _sys_handle(stack_frame_t ctx) {
+int _sys_handle(stack_frame_t ctx)
+{
        switch(ctx.intn) {
        case SYS_VECTOR_CORAX:
                dbg_printf("_corax_call(0x%x, 0x%x, 0x%x);\n", ctx.eax, ctx.ebx, ctx.ecx);
index 09ed515592adba349c62e9b76c8f9503c8cac666..66a02d351d966ac50cb523371a355ccc6881599e 100644 (file)
@@ -41,7 +41,8 @@ static const char *_str_pg_mode[] = {
     "Intel64 mode"
 };
 
-void* pg_dir_create(void) {
+void* pg_dir_create(void)
+{
     void *dir;
 
     dir = NULL;
@@ -55,7 +56,8 @@ void* pg_dir_create(void) {
     return(dir);
 }
 
-static void* _phys_alloc(u32_t size, u32_t align) {
+static void* _phys_alloc(u32_t size, u32_t align)
+{
     extern u32_t _mem_start;
     void *addr;
 
@@ -76,7 +78,8 @@ static void* _phys_alloc(u32_t size, u32_t align) {
     return(addr);
 }
 
-void* pg_init(struct multiboot_info *info) {
+void* pg_init(struct multiboot_info *info)
+{
     struct memory_map *mmap;
     u64_t mem_size;
     u64_t map_end;
index a105ffececa8a2475261662332c49bc347bd8002..09f8cef7aa71b9a4fcdf3c4b49ef3fc0ed45224c 100644 (file)
@@ -74,7 +74,8 @@ void _print_mptbl(void *tbl)
        return;
 }
 
-int corax(void *mb_info, u32_t magic) {
+int corax(void *mb_info, u32_t magic)
+{
     dbg_printf("Corax 0.1 - As the Crow flies\n");
     dbg_printf("(C) 2019 Matthias Kruk <matt@corax.cc>\n");
     dbg_printf("Compiled on %s at %s\n", __DATE__, __TIME__);