Add a skeleton framework for capabilities.
Use the first capability to spawn a child process.
This commit is contained in:
parent
09b8136ef9
commit
69b5cd001f
9 changed files with 97 additions and 4 deletions
3
zion/include/cap_types.h
Normal file
3
zion/include/cap_types.h
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
#define ZC_PROC_SPAWN_CHILD 0x1
|
||||
|
|
@ -12,8 +12,9 @@ uint64_t ZDebug(const char* message);
|
|||
|
||||
// TODO: Move structs into an internal header.
|
||||
struct ZProcessSpawnReq {
|
||||
uint64_t cap_id;
|
||||
uint64_t elf_base;
|
||||
uint64_t elf_size;
|
||||
};
|
||||
|
||||
uint64_t ZProcessSpawn(uint64_t elf_base, uint64_t elf_size);
|
||||
uint64_t ZProcessSpawn(uint64_t cap_id, uint64_t elf_base, uint64_t elf_size);
|
||||
|
|
|
|||
6
zion/include/zerrors.h
Normal file
6
zion/include/zerrors.h
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#define Z_OK 0x0
|
||||
#define ZE_NOT_FOUND 0x1
|
||||
#define ZE_INVALID 0x2
|
||||
#define ZE_DENIED 0x4
|
||||
Loading…
Add table
Add a link
Reference in a new issue