XenevaOS
Loading...
Searching...
No Matches
Macros | Functions | Variables
process.c File Reference
#include <process.h>
#include <aucon.h>
#include <Mm\vmmngr.h>
#include <Mm\kmalloc.h>
#include <pe.h>
#include <Mm\pmmngr.h>
#include <string.h>
#include <_null.h>
#include <Hal/AA64/sched.h>
#include <Mm/shm.h>
Include dependency graph for process.c:

Macros

#define USER_STACK_FLAG   (1ULL<<54 | 2ULL<<6 | 1ULL<<10 | PTE_NORMAL_MEM | 1)
 
#define USER_STACK   0x000000A000000000
 

Functions

void AuAddProcess (AuProcess *parent, AuProcess *proc)
 
void AuRemoveProcess (AuProcess *parent, AuProcess *proc)
 
AuProcessAuProcessFindByPID (AuProcess *proc, int pid)
 
AuProcessAuProcessFindByThread (AuProcess *proc, AA64Thread *thread)
 
AuProcessAuProcessFindPID (int pid)
 
AuProcessAuProcessFindThread (AA64Thread *thread)
 
AuProcessAuProcessFindSubThread (AA64Thread *thread)
 
int AuAllocateProcessID ()
 
uint64_tCreateUserStack (AuProcess *proc, uint64_t *cr3)
 
AuProcessAuCreateProcessSlot (AuProcess *parent, char *name)
 
int AuProcessGetFileDesc (AuProcess *proc)
 

Variables

AuProcessproc_first
 
AuProcessproc_last
 
AuProcessroot_proc
 

Detailed Description

BSD 2-Clause License

Copyright (c) 2022-2025, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

◆ USER_STACK

#define USER_STACK   0x000000A000000000

◆ USER_STACK_FLAG

#define USER_STACK_FLAG   (1ULL<<54 | 2ULL<<6 | 1ULL<<10 | PTE_NORMAL_MEM | 1)

Function Documentation

◆ AuAddProcess()

void AuAddProcess ( AuProcess parent,
AuProcess proc 
)

◆ AuAllocateProcessID()

int AuAllocateProcessID ( )

◆ AuCreateProcessSlot()

AuProcess * AuCreateProcessSlot ( AuProcess parent,
char *  name 
)

◆ AuProcessFindByPID()

AuProcess * AuProcessFindByPID ( AuProcess proc,
int  pid 
)

◆ AuProcessFindByThread()

AuProcess * AuProcessFindByThread ( AuProcess proc,
AA64Thread *  thread 
)

◆ AuProcessFindPID()

AuProcess * AuProcessFindPID ( int  pid)

◆ AuProcessFindSubThread()

AuProcess * AuProcessFindSubThread ( AA64Thread *  thread)

◆ AuProcessFindThread()

AuProcess * AuProcessFindThread ( AA64Thread *  thread)

◆ AuProcessGetFileDesc()

int AuProcessGetFileDesc ( AuProcess proc)

◆ AuRemoveProcess()

void AuRemoveProcess ( AuProcess parent,
AuProcess proc 
)

◆ CreateUserStack()

uint64_t * CreateUserStack ( AuProcess proc,
uint64_t cr3 
)

Variable Documentation

◆ proc_first

AuProcess* proc_first

◆ proc_last

AuProcess* proc_last

◆ root_proc

AuProcess* root_proc