feat: added cross compiler and moved headers to include dir
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// Created by rick on 27-02-21.
|
||||
//
|
||||
|
||||
#include "locking.h"
|
||||
#include <tasks/locking.h>
|
||||
#include <mem/malloc.h>
|
||||
#include <tasks/task.h>
|
||||
#include <libk/syscall.h>
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
//
|
||||
// Created by rick on 27-02-21.
|
||||
//
|
||||
|
||||
#ifndef NEW_KERNEL_LOCKING_H
|
||||
#define NEW_KERNEL_LOCKING_H
|
||||
|
||||
#include <types.h>
|
||||
|
||||
typedef struct semaphore semaphore_t;
|
||||
|
||||
typedef struct mutex mutex_t;
|
||||
|
||||
typedef struct spinlock spinlock_t;
|
||||
|
||||
semaphore_t *semaphore_create(int32_t start);
|
||||
|
||||
void semaphore_wait(semaphore_t *semaphore);
|
||||
|
||||
void semaphore_signal(semaphore_t *semaphore);
|
||||
|
||||
void semaphore_free(semaphore_t *semaphore);
|
||||
|
||||
mutex_t *mutex_create();
|
||||
|
||||
void mutex_acquire(mutex_t *mutex);
|
||||
|
||||
void mutex_release(mutex_t *mutex);
|
||||
|
||||
void mutex_free(mutex_t *mutex);
|
||||
|
||||
spinlock_t *spinlock_create();
|
||||
|
||||
void spinlock_acquire(spinlock_t *spinlock);
|
||||
|
||||
void spinlock_release(spinlock_t *spinlock);
|
||||
|
||||
void spinlock_free(spinlock_t *spinlock);
|
||||
|
||||
#endif //NEW_KERNEL_LOCKING_H
|
||||
@@ -2,7 +2,7 @@
|
||||
// Created by rick on 22-02-21.
|
||||
//
|
||||
|
||||
#include "task.h"
|
||||
#include <tasks/task.h>
|
||||
#include <cpu/cpu.h>
|
||||
#include <stdbool.h>
|
||||
#include <libc/libc.h>
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
//
|
||||
// Created by rick on 22-02-21.
|
||||
//
|
||||
|
||||
#ifndef NEW_KERNEL_TASK_H
|
||||
#define NEW_KERNEL_TASK_H
|
||||
|
||||
#include <cpu/cpu.h>
|
||||
|
||||
typedef void (*task_entrypoint)(void *entry_data);
|
||||
|
||||
void task_notify_irq(uint8_t irq_no);
|
||||
|
||||
void task_wait_irq(uint16_t irq_bits);
|
||||
|
||||
void task_init();
|
||||
|
||||
void task_start_first();
|
||||
|
||||
void task_switch_next();
|
||||
|
||||
uint32_t task_spawn(task_entrypoint, void *entry_data);
|
||||
|
||||
void task_end(uint32_t tid);
|
||||
|
||||
void task_suspend();
|
||||
|
||||
uint32_t task_get_current_tid();
|
||||
|
||||
void task_signal(uint32_t tid);
|
||||
|
||||
void task_lock_acquire();
|
||||
|
||||
void task_ensure_enabled();
|
||||
|
||||
void task_lock_free();
|
||||
|
||||
#endif //NEW_KERNEL_TASK_H
|
||||
Reference in New Issue
Block a user