forked from pepper-org/pepperOS
End the _t nonsense
This commit is contained in:
+2
-2
@@ -36,7 +36,7 @@ struct idtr {
|
||||
// All general-purpose registers (except rsp) as stored on the stack,
|
||||
// plus the values we pushed (vector number, error code) and the iret frame
|
||||
// In reverse order because the stack grows downwards.
|
||||
struct cpu_status_t {
|
||||
struct cpu_status {
|
||||
uint64_t r15;
|
||||
uint64_t r14;
|
||||
uint64_t r13;
|
||||
@@ -63,6 +63,6 @@ struct cpu_status_t {
|
||||
uint64_t iret_ss;
|
||||
};
|
||||
|
||||
struct cpu_status_t* syscall_handler(struct cpu_status_t* regs);
|
||||
struct cpu_status* syscall_handler(struct cpu_status* regs);
|
||||
|
||||
#endif
|
||||
+1
-1
@@ -35,7 +35,7 @@ extern volatile uint64_t ticks;
|
||||
|
||||
// printf("debug: [%s]: " log "\n", __FILE__, ##__VA_ARGS__);
|
||||
|
||||
void panic(struct cpu_status_t* ctx, const char* str);
|
||||
void panic(struct cpu_status* ctx, const char* str);
|
||||
void hcf(void);
|
||||
void idle(void);
|
||||
|
||||
|
||||
+2
-2
@@ -16,11 +16,11 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct heap_block_t {
|
||||
struct heap_block {
|
||||
size_t size;
|
||||
bool free; // 1byte
|
||||
uint8_t reserved[7]; // (7+1 = 8 bytes)
|
||||
struct heap_block_t* next;
|
||||
struct heap_block* next;
|
||||
} __attribute__((aligned(16)));
|
||||
|
||||
void kheap_init(void);
|
||||
|
||||
@@ -34,7 +34,7 @@ extern uint64_t hhdm_off;
|
||||
#define PAGE_ALIGN_DOWN(x) ((x) & PTE_ADDR_MASK)
|
||||
|
||||
#define ALIGN(size) ALIGN_UP(size, 16)
|
||||
#define BLOCK_MIN_SIZE (sizeof(struct heap_block_t) + 16)
|
||||
#define BLOCK_MIN_SIZE (sizeof(struct heap_block) + 16)
|
||||
|
||||
#define PML4_INDEX(x) (((x) >> 39) & 0x1FF)
|
||||
#define PDPT_INDEX(x) (((x) >> 30) & 0x1FF)
|
||||
|
||||
@@ -17,23 +17,23 @@ typedef enum {
|
||||
DEAD
|
||||
} status_t;
|
||||
|
||||
struct process_t {
|
||||
struct process {
|
||||
size_t pid;
|
||||
char name[PROCESS_NAME_MAX];
|
||||
|
||||
status_t status;
|
||||
struct cpu_status_t* context;
|
||||
struct cpu_status* context;
|
||||
void* root_page_table; // Process PML4 (should contain kernel PML4 in higher half [256-511]
|
||||
struct process_t* next;
|
||||
struct process* next;
|
||||
};
|
||||
|
||||
void process_init(void);
|
||||
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_delete(struct process_t** processes_list, struct process_t* process);
|
||||
struct process_t* process_get_next(struct process_t* process);
|
||||
struct process* process_create(char* name, void(*function)(void*), void* arg);
|
||||
void process_add(struct process** processes_list, struct process* process);
|
||||
void process_delete(struct process** processes_list, struct process* process);
|
||||
struct process* process_get_next(struct process* process);
|
||||
void process_exit(void);
|
||||
|
||||
void process_display_list(struct process_t* processes_list);
|
||||
void process_display_list(struct process* processes_list);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef SCHEDULER_H
|
||||
#define SCHEDULER_H
|
||||
|
||||
struct cpu_status_t* scheduler_schedule(struct cpu_status_t* context);
|
||||
struct cpu_status* scheduler_schedule(struct cpu_status* context);
|
||||
void scheduler_init(void);
|
||||
|
||||
#endif
|
||||
@@ -10,13 +10,13 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct spinlock_t
|
||||
struct spinlock
|
||||
{
|
||||
bool locked;
|
||||
uint64_t rflags;
|
||||
};
|
||||
|
||||
void spinlock_acquire(struct spinlock_t* lock);
|
||||
void spinlock_release(struct spinlock_t* lock);
|
||||
void spinlock_acquire(struct spinlock* lock);
|
||||
void spinlock_release(struct spinlock* lock);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user