10#ifndef MAXOS_PROCESSES_RESOURCES_SCHEDULER_RESOURCES_H
11#define MAXOS_PROCESSES_RESOURCES_SCHEDULER_RESOURCES_H
17#include <libkpi/processes/thread.h>
18#include <libkpi/processes/process.h>
23namespace MaxOS::processes::resources {
43 void close(
size_t flags)
final;
45 int read(
void* buffer,
size_t size,
size_t flags)
final;
46 int write(
const void* buffer,
size_t size,
size_t flags)
final;
69 void close(
size_t flags)
final;
71 int read(
void* buffer,
size_t size,
size_t flags)
final;
72 int write(
const void* buffer,
size_t size,
size_t flags)
final;
A process that can be scheduled by the Scheduler, wraps & manages threads as well as its own address ...
The execution context of a sub-process thread.
Manages the creation, retention and destruction of resources representing processes.
Resource * get_resource(const string &name) final
The.
Resource * create_resource(const string &name, size_t flags, uintptr_t data) final
Opens an executable.
A wrapper for a Process which exposes Process operations as Resource operations.
int write(const void *buffer, size_t size, size_t flags) final
Writes data to the process resource.
Process * process
The process that this resource handles & exposes.
uint64_t exit_code
The exit code of the process once it has exited.
void close(size_t flags) final
Closes the process resource, killing the process and removing it from the scheduler.
int read(void *buffer, size_t size, size_t flags) final
Reads data from the process resource.
A resource registry for a specific resource type.
Manages the creation, retention and destruction of resources representing threads.
Resource * create_resource(const string &name, size_t flags, uintptr_t data) final
td
Resource * get_resource(const string &name) final
Gets a resource from the registry by name.
A wrapper for a Thread which exposes Thread operations as Resource operations.
void close(size_t flags) final
Closes the thread resource, marking the thread to be removed by the scheduler.
uint64_t exit_code
The exit code of the thread once it has exited.
int read(void *buffer, size_t size, size_t flags) final
Reads data from the thread resource.
int write(const void *buffer, size_t size, size_t flags) final
Writes data to the thread resource.
Thread * thread
The thread that this resource handles & exposes.
Defines Process and Thread classes for managing processes and their execution contexts.
Defines classes for managing process resources such as files and devices.
KPI::Resource Resource
Alias to make the libsyscore Resource accessible here.
KPI::ResourceType resource_type_t
Alias to make the libsyscore ResourceType accessible here.