procgroup capabilities
All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m55s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m55s
This commit is contained in:
6
kernel/proc/capability.h
Normal file
6
kernel/proc/capability.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef _KERNEL_PROC_CAPABILITY_H
|
||||
#define _KERNEL_PROC_CAPABILITY_H
|
||||
|
||||
#define PROC_CAP_TERMINAL (1 << 0)
|
||||
|
||||
#endif // _KERNEL_PROC_CAPABILITY_H
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <m/status.h>
|
||||
#include <mm/liballoc.h>
|
||||
#include <mm/pmm.h>
|
||||
#include <proc/capability.h>
|
||||
#include <proc/proc.h>
|
||||
#include <proc/procgroup.h>
|
||||
#include <proc/resource.h>
|
||||
@@ -303,6 +304,7 @@ void proc_init (void) {
|
||||
proc_register (spin_proc, &spin_cpu);
|
||||
|
||||
struct proc* init = proc_from_file ("ramdisk", "/init.exe");
|
||||
init->procgroup->capabilities |= PROC_CAP_TERMINAL;
|
||||
struct cpu* init_cpu = thiscpu;
|
||||
proc_register (init, &init_cpu);
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ struct procgroup {
|
||||
struct list_node_link* mappings;
|
||||
uintptr_t map_base;
|
||||
struct procgroup_tls tls;
|
||||
uint64_t capabilities;
|
||||
};
|
||||
|
||||
struct procgroup* procgroup_create (void);
|
||||
|
||||
Reference in New Issue
Block a user