Added usermode process creation (currently broken)

This commit is contained in:
Alex
2022-11-04 05:32:27 +02:00
parent 8cc9ff4ff3
commit 5de0a3972c
4 changed files with 130 additions and 6 deletions

View File

@ -3,12 +3,24 @@
#include <types.h>
#include <task.hpp>
namespace Execute
{
enum BinaryType
{
BinTypeInvalid,
BinTypeFex,
BinTypeElf,
BinTypePE,
BinTypeUnknown
};
enum ExStatus
{
OK,
Unknown,
Unsupported,
InvalidFile,
InvalidFileFormat,
InvalidFileHeader,
@ -17,7 +29,15 @@ namespace Execute
InvalidFilePath
};
ExStatus Spawn(char *Path, uint64_t Arg0, uint64_t Arg1);
struct SpawnData
{
ExStatus Status;
Tasking::PCB *Process;
Tasking::TCB *Thread;
};
BinaryType GetBinaryType(char *Path);
SpawnData Spawn(char *Path, uint64_t Arg0, uint64_t Arg1);
}
#endif // !__FENNIX_KERNEL_FILE_EXECUTE_H__