My Kernel v0.1.0

A single process. More...

#include <process.h>

Data Fields

char name [PROCESS_NAME_MAX_LEN]
 
pid_t pid
 
struct address_spaceas
 
llist_t threads
 
size_t refcount
 
struct filefiles [PROCESS_FD_COUNT]
 Open file descriptors table. More...
 
spinlock_t files_lock
 
spinlock_t lock
 Transmitted to the parent process during wait()
 

Detailed Description

The struct contains information about the process, including its name, unique ID and resources context (address space, file descriptors, ...). It also contains a list of all the process's active threads.

Field Documentation

◆ as

struct address_space* process::as

The process's address space

◆ files

struct file* process::files[PROCESS_FD_COUNT]

This table is lock protected by files_lock, one must always take this lock when accessing a process' open files (read AND write).

◆ files_lock

spinlock_t process::files_lock

Lock for open_files

◆ name

char process::name[PROCESS_NAME_MAX_LEN]

The thread's name

◆ pid

pid_t process::pid

Process' unique ID

◆ refcount

size_t process::refcount

Reference count to this process. We only kill a process once all of its threads have been released.

◆ threads

llist_t process::threads

Linked list of the process' active threads


The documentation for this struct was generated from the following file: