Files
mop3/libu/process.h
kamkow1 c8fb575bdd
All checks were successful
Build ISO image / build-and-deploy (push) Successful in 2m7s
Build documentation / build-and-deploy (push) Successful in 39s
Change formatting rules
2026-04-24 01:54:48 +02:00

36 lines
739 B
C

#ifndef _LIBPROCESS_PROCESS_PROCESS_H
#define _LIBPROCESS_PROCESS_PROCESS_H
#include <page_size.h>
#include <system.h>
/* Size of process' stack */
#define STACK_SIZE (256 * PAGE_SIZE)
/* Process entry function */
typedef void (*process_func_t)(void*);
struct process_data {
void* arg_ptr;
process_func_t fn;
int pid;
void* stack;
};
/* Spawn a new process within the same procgroup with argument */
struct process_data* process_spawn(process_func_t func, void* argument_ptr);
void process_data_free(struct process_data* pdata);
int process_get_exec_pid(void);
int process_get_exec_pgid(void);
int process_get_pid(void);
int process_get_pgid(void);
void process_self_init(void);
#endif // _LIBPROCESS_PROCESS_PROCESS_H