WIP: fleshing out cod2 for once a bit more

Planning to try out a flavor of Ryan's multi-threaded laned procs with the some extra threads hooked up separately to a job system.
Will most likely do 2 threads main/helper on live lanes, then 2 others on job queue loops
This commit is contained in:
2025-10-11 19:17:29 -04:00
parent 7219b780fc
commit 05e979907a
20 changed files with 387 additions and 37 deletions

View File

@@ -12,23 +12,21 @@ ModuleAPI :: struct {
lib: dynlib.Library,
// write-time: FileTime,
startup: type_of( startup ),
shutdown: type_of( sectr_shutdown ),
reload: type_of( hot_reload ),
tick: type_of( tick ),
clean_frame: type_of( clean_frame ),
startup: type_of( startup ),
hot_reload: type_of( hot_reload ),
}
StartupContext :: struct {}
@export
startup :: proc(ctx: StartupContext)
startup :: proc(host_mem: ^HostMemory)
{
thread_wide_startup()
}
@export
sectr_shutdown :: proc()
thread_wide_startup :: proc()
{
}
@@ -38,15 +36,3 @@ hot_reload :: proc()
{
}
@export
tick :: proc()
{
}
@export
clean_frame ::proc()
{
}

View File

@@ -0,0 +1,16 @@
package sectr
HostMemory :: struct {
client_api: ModuleAPI,
client_memory: ^State,
host_api: Host_API,
}
Host_API :: struct {
launch_thread: #type proc(),
request_virtual_memory: #type proc(),
request_virtual_mapped_io: #type proc(),
sync_client_module : #type proc(),
}