Config header file + comment header
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
/*
|
||||
* @author xamidev <xamidev@riseup.net>
|
||||
* @brief Process linked list implementation
|
||||
* @license GPL-3.0-only
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include "process.h"
|
||||
#include "mem/heap/kheap.h"
|
||||
#include "kernel.h"
|
||||
#include "string/string.h"
|
||||
#include "mem/gdt/gdt.h"
|
||||
#include "config.h"
|
||||
|
||||
struct process_t* processes_list;
|
||||
struct process_t* current_process;
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
/*
|
||||
* @author xamidev <xamidev@riseup.net>
|
||||
* @brief Process definition
|
||||
* @license GPL-3.0-only
|
||||
*/
|
||||
|
||||
#ifndef PROCESS_H
|
||||
#define PROCESS_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include "config.h"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@@ -10,9 +17,6 @@ typedef enum
|
||||
DEAD
|
||||
} status_t;
|
||||
|
||||
#define PROCESS_NAME_MAX 64
|
||||
#define PROCESS_STACK_SIZE 0x10000 // 64kb
|
||||
|
||||
struct process_t
|
||||
{
|
||||
size_t pid;
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
/*
|
||||
* @author xamidev <xamidev@riseup.net>
|
||||
* @brief Round-robin scheduler
|
||||
* @license GPL-3.0-only
|
||||
*/
|
||||
|
||||
#include "kernel.h"
|
||||
#include "process.h"
|
||||
|
||||
@@ -35,6 +41,6 @@ struct cpu_status_t* scheduler_schedule(struct cpu_status_t* context)
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG("SCHEDULER CALLED: current_process=%p", current_process);
|
||||
DEBUG("current_process={pid=%u name='%s'}", current_process->pid, current_process->name);
|
||||
return current_process->context;
|
||||
}
|
||||
@@ -1,3 +1,9 @@
|
||||
/*
|
||||
* @author xamidev <xamidev@riseup.net>
|
||||
* @brief Round-robin scheduler
|
||||
* @license GPL-3.0-only
|
||||
*/
|
||||
|
||||
#ifndef SCHEDULER_H
|
||||
#define SCHEDULER_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user