Max OS 0.3
Loading...
Searching...
No Matches
process.h File Reference

Defines Process and Thread classes for managing processes and their execution contexts. More...

#include <system/cpu.h>
#include <common/vector.h>
#include <common/map.h>
#include <common/string.h>
#include <cstdint>
#include <memory/virtual.h>
#include <memory/memorymanagement.h>
#include <memory/memoryIO.h>
#include <processes/elf.h>
#include <processes/resource.h>

Go to the source code of this file.

Classes

class  MaxOS::processes::Thread
 The execution context of a sub-process thread. More...
 
class  MaxOS::processes::Process
 A process that can be scheduled by the Scheduler, wraps & manages threads as well as its own address space and resources. More...
 

Typedefs

typedef enum MaxOS::processes::ThreadState MaxOS::processes::thread_state_t
 Alias for ThreadState enum.
 

Enumerations

enum class  MaxOS::processes::ThreadState {
  NEW , RUNNING , READY , SLEEPING ,
  WAITING , STOPPED
}
 The different operational states a thread can be in. More...
 

Variables

constexpr size_t MaxOS::processes::STACK_SIZE = 0x10000
 The size of the stack for each thread (4KB)
 

Detailed Description

Defines Process and Thread classes for managing processes and their execution contexts.

Date
25th February 2025
Author
Max Tyson

Definition in file process.h.

Enumeration Type Documentation

◆ ThreadState

enum class MaxOS::processes::ThreadState
strong

The different operational states a thread can be in.

Definition at line 33 of file process.h.

33 {
34 NEW,
35 RUNNING,
36 READY,
37 SLEEPING,
38 WAITING,
39 STOPPED
enum MaxOS::processes::ThreadState thread_state_t
Alias for ThreadState enum.

Variable Documentation

◆ STACK_SIZE

constexpr size_t MaxOS::processes::STACK_SIZE = 0x10000
constexpr

The size of the stack for each thread (4KB)

Definition at line 43 of file process.h.

Referenced by MaxOS::processes::Thread::Thread().