void parameter on functions of arity 0

This commit is contained in:
2026-03-13 17:21:52 +01:00
parent 8026c33639
commit 5c0d02579b
13 changed files with 17 additions and 22 deletions

View File

@@ -20,7 +20,7 @@ void debug_stack_trace(unsigned int max_frames)
{ {
DEBUG("*** begin stack trace ***"); DEBUG("*** begin stack trace ***");
if (init.terminal) { if (init.terminal) {
printf("\r\n*** begin stack trace ***\r\n"); printf("\r\n\x1b[48;5;232m\x1b[38;5;231m*** begin stack trace ***\r\n");
} }
// Thanks GCC :) // Thanks GCC :)
uintptr_t* rbp = (uintptr_t*)__builtin_frame_address(0); uintptr_t* rbp = (uintptr_t*)__builtin_frame_address(0);
@@ -46,7 +46,7 @@ void debug_stack_trace(unsigned int max_frames)
rbp = next_rbp; rbp = next_rbp;
} }
if (init.terminal) { if (init.terminal) {
printf("*** end stack trace ***"); printf("*** end stack trace ***[0m");
} }
DEBUG("*** end stack trace ***"); DEBUG("*** end stack trace ***");
} }

View File

@@ -9,7 +9,7 @@
#include <stdint.h> #include <stdint.h>
void idt_init(); void idt_init(void);
struct interrupt_descriptor { struct interrupt_descriptor {
uint16_t address_low; uint16_t address_low;

View File

@@ -7,7 +7,7 @@
#ifndef PS2_H #ifndef PS2_H
#define PS2_H #define PS2_H
void keyboard_handler(); void keyboard_handler(void);
#define SHIFT_PRESSED_BIT 0b00000001 #define SHIFT_PRESSED_BIT 0b00000001
#define ALT_PRESSED_BIT 0b00000010 #define ALT_PRESSED_BIT 0b00000010

View File

@@ -13,7 +13,7 @@
void outb(int port, unsigned char data); void outb(int port, unsigned char data);
unsigned char inb(int port); unsigned char inb(int port);
int serial_init(); int serial_init(void);
void skputs(const char* str); void skputs(const char* str);
void skputc(char c); void skputc(char c);

View File

@@ -9,6 +9,6 @@
void kputs(const char* str); void kputs(const char* str);
void _putchar(char character); void _putchar(char character);
void term_init(); void term_init(void);
#endif #endif

View File

@@ -64,15 +64,10 @@ extern struct process_t* processes_list;
extern struct process_t* current_process; extern struct process_t* current_process;
struct process_t* idle_proc; struct process_t* idle_proc;
bool iran = false;
// Never gets executed although pedicel is scheduled? // Never gets executed although pedicel is scheduled?
void pedicel_main(void* arg) void pedicel_main(void* arg)
{ {
//panic(NULL, "test"); printf("\n\nWelcome to PepperOS! Pedicel speaking.\r\nNothing left to do, let's go idle!");
bool iran = true;
// FROM THE NEXT LINE ONWARDS, CANNOT WRITE TO FRAMEBUFFER WITHOUT PAGE FAULT!
//printf("\n\nWelcome to PepperOS! Pedicel speaking.\nNothing left to do, halting the system!");
} }
void idle_main(void* arg) void idle_main(void* arg)

View File

@@ -26,6 +26,6 @@ struct GDTR {
uint64_t address; uint64_t address;
} __attribute__((packed)); } __attribute__((packed));
void gdt_init(); void gdt_init(void);
#endif #endif

View File

@@ -23,10 +23,10 @@ struct heap_block_t {
struct heap_block_t* next; struct heap_block_t* next;
} __attribute__((aligned(16))); } __attribute__((aligned(16)));
void kheap_init(); void kheap_init(void);
void* kmalloc(size_t size); void* kmalloc(size_t size);
void kfree(void* ptr); void kfree(void* ptr);
void* kalloc_stack(); void* kalloc_stack(void);
void kheap_map_page(); void kheap_map_page(void);
#endif #endif

View File

@@ -12,6 +12,6 @@
void pmm_init(struct boot_context boot_ctx); void pmm_init(struct boot_context boot_ctx);
void pmm_free(uintptr_t addr); void pmm_free(uintptr_t addr);
uintptr_t pmm_alloc(); uintptr_t pmm_alloc(void);
#endif #endif

View File

@@ -29,6 +29,6 @@ struct vm_object {
#define VM_FLAG_EXEC (1 << 1) #define VM_FLAG_EXEC (1 << 1)
#define VM_FLAG_USER (1 << 2) #define VM_FLAG_USER (1 << 2)
void vmm_init(); void vmm_init(void);
#endif #endif

View File

@@ -27,12 +27,12 @@ struct process_t {
struct process_t* next; struct process_t* next;
}; };
void process_init(); void process_init(void);
struct process_t* process_create(char* name, void(*function)(void*), void* arg); struct process_t* process_create(char* name, void(*function)(void*), void* arg);
void process_add(struct process_t** processes_list, struct process_t* process); void process_add(struct process_t** processes_list, struct process_t* process);
void process_delete(struct process_t** processes_list, struct process_t* process); void process_delete(struct process_t** processes_list, struct process_t* process);
struct process_t* process_get_next(struct process_t* process); struct process_t* process_get_next(struct process_t* process);
void process_exit(); void process_exit(void);
void process_display_list(struct process_t* processes_list); void process_display_list(struct process_t* processes_list);

View File

@@ -8,6 +8,6 @@
#define SCHEDULER_H #define SCHEDULER_H
struct cpu_status_t* scheduler_schedule(struct cpu_status_t* context); struct cpu_status_t* scheduler_schedule(struct cpu_status_t* context);
void scheduler_init(); void scheduler_init(void);
#endif #endif

View File

@@ -7,7 +7,7 @@
#ifndef TIMER_H #ifndef TIMER_H
#define TIMER_H #define TIMER_H
void timer_init(); void timer_init(void);
void timer_wait(unsigned int wait_ticks); void timer_wait(unsigned int wait_ticks);
#endif #endif