ptos: ps: Add process init logic
Signed-off-by: Chloe M <chloe@mensia.org>
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 2026, Chloe M.
|
||||
* Provided under the BSD-3 clause.
|
||||
*
|
||||
* Description: Process management
|
||||
* Author: Chloe M.
|
||||
*/
|
||||
|
||||
#ifndef _PS_PROCESS_H_
|
||||
#define _PS_PROCESS_H_ 1
|
||||
|
||||
#include <ptapi/status.h>
|
||||
#include <ptdef.h>
|
||||
|
||||
/* Maximum length of process name */
|
||||
#define PS_NAME_MAX 64
|
||||
|
||||
/* Pool tag for process allocations */
|
||||
#define PS_POOL_TAG 'PS'
|
||||
|
||||
/* Process flags */
|
||||
#define PS_USER BIT(0) /* Set if user-level */
|
||||
|
||||
/*
|
||||
* Represents a running process on the machine
|
||||
*
|
||||
* @Name: Name of process
|
||||
* @Pid: Process ID
|
||||
* @Flags: Initialization flags
|
||||
*/
|
||||
typedef struct {
|
||||
CHAR Name[PS_NAME_MAX];
|
||||
UQUAD Pid;
|
||||
ULONG Flags;
|
||||
} PROCESS;
|
||||
|
||||
/*
|
||||
* Allocate and create a new process descriptor
|
||||
*
|
||||
* @Name: Name of process
|
||||
* @Flags: Initialization flags of process
|
||||
* @Result: Result is written here
|
||||
*/
|
||||
PT_STATUS PsCreateProcess(const CHAR *Name, ULONG Flags, PROCESS **Result);
|
||||
|
||||
#endif /* !_PS_PROCESS_H_ */
|
||||
Reference in New Issue
Block a user