stub out linux demon; linux font provider; begin work, get windows/events up and running in os_gfx

This commit is contained in:
Ryan Fleury
2024-07-18 13:37:22 -07:00
parent ec9c68f55e
commit 4835264059
17 changed files with 999 additions and 481 deletions
+12 -10
View File
@@ -1,10 +1,12 @@
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
#include "demon_core.c"
#if OS_WINDOWS
# include "win32/demon_core_win32.c"
#else
# error Demon layer backend not defined for this operating system.
#endif
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
#include "demon/demon_core.c"
#if OS_WINDOWS
# include "demon/win32/demon_core_win32.c"
#elif OS_LINUX
# include "demon/linux/demon_core_linux.c"
#else
# error Demon layer backend not defined for this operating system.
#endif
+4 -2
View File
@@ -4,10 +4,12 @@
#ifndef DEMON_INC_H
#define DEMON_INC_H
#include "demon_core.h"
#include "demon/demon_core.h"
#if OS_WINDOWS
# include "win32/demon_core_win32.h"
# include "demon/win32/demon_core_win32.h"
#elif OS_LINUX
# include "demon/linux/demon_core_linux.h"
#else
# error Demon layer backend not defined for this operating system.
#endif
+174
View File
@@ -0,0 +1,174 @@
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
////////////////////////////////
//~ rjf: @dmn_os_hooks Main Layer Initialization (Implemented Per-OS)
internal void
dmn_init(void)
{
}
////////////////////////////////
//~ rjf: @dmn_os_hooks Blocking Control Thread Operations (Implemented Per-OS)
internal DMN_CtrlCtx *
dmn_ctrl_begin(void)
{
}
internal void
dmn_ctrl_exclusive_access_begin(void)
{
}
internal void
dmn_ctrl_exclusive_access_end(void)
{
}
internal U32
dmn_ctrl_launch(DMN_CtrlCtx *ctx, OS_ProcessLaunchParams *params)
{
}
internal B32
dmn_ctrl_attach(DMN_CtrlCtx *ctx, U32 pid)
{
}
internal B32
dmn_ctrl_kill(DMN_CtrlCtx *ctx, DMN_Handle process, U32 exit_code)
{
}
internal B32
dmn_ctrl_detach(DMN_CtrlCtx *ctx, DMN_Handle process)
{
}
internal DMN_EventList
dmn_ctrl_run(Arena *arena, DMN_CtrlCtx *ctx, DMN_RunCtrls *ctrls)
{
}
////////////////////////////////
//~ rjf: @dmn_os_hooks Halting (Implemented Per-OS)
internal void
dmn_halt(U64 code, U64 user_data)
{
}
////////////////////////////////
//~ rjf: @dmn_os_hooks Introspection Functions (Implemented Per-OS)
//- rjf: run/memory/register counters
internal U64
dmn_run_gen(void)
{
}
internal U64
dmn_mem_gen(void)
{
}
internal U64
dmn_reg_gen(void)
{
}
//- rjf: non-blocking-control-thread access barriers
internal B32
dmn_access_open(void)
{
}
internal void
dmn_access_close(void)
{
}
//- rjf: processes
internal U64
dmn_process_memory_reserve(DMN_Handle process, U64 vaddr, U64 size)
{
}
internal void
dmn_process_memory_commit(DMN_Handle process, U64 vaddr, U64 size)
{
}
internal void
dmn_process_memory_decommit(DMN_Handle process, U64 vaddr, U64 size)
{
}
internal void
dmn_process_memory_release(DMN_Handle process, U64 vaddr, U64 size)
{
}
internal void
dmn_process_memory_protect(DMN_Handle process, U64 vaddr, U64 size, OS_AccessFlags flags)
{
}
internal U64
dmn_process_read(DMN_Handle process, Rng1U64 range, void *dst)
{
}
internal B32
dmn_process_write(DMN_Handle process, Rng1U64 range, void *src)
{
}
//- rjf: threads
internal Architecture
dmn_arch_from_thread(DMN_Handle handle)
{
}
internal U64
dmn_stack_base_vaddr_from_thread(DMN_Handle handle)
{
}
internal U64
dmn_tls_root_vaddr_from_thread(DMN_Handle handle)
{
}
internal B32
dmn_thread_read_reg_block(DMN_Handle handle, void *reg_block)
{
}
internal B32
dmn_thread_write_reg_block(DMN_Handle handle, void *reg_block)
{
}
//- rjf: system process listing
internal void
dmn_process_iter_begin(DMN_ProcessIter *iter)
{
}
internal B32
dmn_process_iter_next(Arena *arena, DMN_ProcessIter *iter, DMN_ProcessInfo *info_out)
{
}
internal void
dmn_process_iter_end(DMN_ProcessIter *iter)
{
}
+7
View File
@@ -0,0 +1,7 @@
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
#ifndef DEMON_CORE_LINUX_H
#define DEMON_CORE_LINUX_H
#endif // DEMON_CORE_LINUX_H