2019-10-03 17:57:44 +00:00
|
|
|
/*
|
2019-10-08 01:42:23 +00:00
|
|
|
* 4coder_system_types.h - Types relating to the system api.
|
2019-10-03 17:57:44 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
// TOP
|
|
|
|
|
|
|
|
#if !defined(FCODER_SYSTEM_TYPES_H)
|
|
|
|
#define FCODER_SYSTEM_TYPES_H
|
|
|
|
|
|
|
|
struct Plat_Handle{
|
|
|
|
u32 d[4];
|
|
|
|
};
|
|
|
|
typedef Plat_Handle System_Library;
|
|
|
|
typedef Plat_Handle System_Thread;
|
|
|
|
typedef Plat_Handle System_Mutex;
|
|
|
|
typedef Plat_Handle System_Condition_Variable;
|
|
|
|
typedef void Thread_Function(void *ptr);
|
|
|
|
struct CLI_Handles{
|
|
|
|
Plat_Handle proc;
|
|
|
|
Plat_Handle out_read;
|
|
|
|
Plat_Handle out_write;
|
|
|
|
Plat_Handle in_read;
|
|
|
|
Plat_Handle in_write;
|
|
|
|
u32 scratch_space[4];
|
|
|
|
i32 exit;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef i32 System_Path_Code;
|
|
|
|
enum{
|
|
|
|
SystemPath_CurrentDirectory,
|
|
|
|
SystemPath_Binary,
|
|
|
|
};
|
|
|
|
|
2019-11-22 05:37:11 +00:00
|
|
|
struct Memory_Annotation_Node{
|
|
|
|
Memory_Annotation_Node *next;
|
|
|
|
String_Const_u8 location;
|
|
|
|
void *address;
|
2019-12-18 03:38:08 +00:00
|
|
|
u64 size;
|
2019-11-22 05:37:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Memory_Annotation{
|
|
|
|
Memory_Annotation_Node *first;
|
|
|
|
Memory_Annotation_Node *last;
|
|
|
|
i32 count;
|
|
|
|
};
|
|
|
|
|
2019-10-08 01:42:23 +00:00
|
|
|
struct Mutex_Lock{
|
|
|
|
Mutex_Lock(System_Mutex mutex);
|
|
|
|
~Mutex_Lock();
|
|
|
|
operator System_Mutex();
|
|
|
|
System_Mutex mutex;
|
|
|
|
};
|
|
|
|
|
2019-10-03 17:57:44 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// BOTTOM
|
|
|
|
|