From 38764943e5fc61c424c018068dc7f6790dddf147 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 29 Feb 2024 02:29:14 +0100 Subject: Format repass. --- include/process.h | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) (limited to 'include/process.h') diff --git a/include/process.h b/include/process.h index 26772c3..aa017c6 100644 --- a/include/process.h +++ b/include/process.h @@ -11,7 +11,8 @@ #ifndef SALIS_PROCESS_H #define SALIS_PROCESS_H -/** The Process data-structure. The 'SALIS_PROC_ELEMENT' macro helps python +/** +* The Process data-structure. The 'SALIS_PROC_ELEMENT' macro helps python * parse the struct, so don't change it! */ struct Process @@ -31,59 +32,72 @@ struct Process typedef struct Process Process; -void _sal_proc_init(void); -void _sal_proc_quit(void); -void _sal_proc_load_from(FILE *file); -void _sal_proc_save_into(FILE *file); - -/** Get process count. +/** +* Get process count. * @return Amount of running (living) processes */ SALIS_API uint32 sal_proc_get_count(void); -/** Get reaper queue capacity. +/** +* Get reaper queue capacity. * @return Currently allocated size of reaper queue */ SALIS_API uint32 sal_proc_get_capacity(void); -/** Get first process. +/** +* Get first process. * @return Process currently on top of reaper queue */ SALIS_API uint32 sal_proc_get_first(void); -/** Get last process. +/** +* Get last process. * @return Process currently on bottom of reaper queue (closest to death) */ SALIS_API uint32 sal_proc_get_last(void); -/** Check if process is currently free. +/** +* Check if process is currently free. * @param proc_id ID of process whose status we want to check * @return Status (either free or running) of the process with the given ID */ SALIS_API boolean sal_proc_is_free(uint32 proc_id); -/** Get process. +/** +* Get process. * @param proc_id ID of Process being queried * @return A copy of the process with the given ID */ SALIS_API Process sal_proc_get_proc(uint32 proc_id); -/** Get process data. +/** +* Get process data. * @param proc_id ID of Process being queried * @param buffer Pre-allocated buffer to store data on [ > sizeof(Process)] */ SALIS_API void sal_proc_get_proc_data(uint32 proc_id, uint32_p buffer); -/** Create new process. +/** +* Create new process. * @param address Address we want to allocate our process into * @param mb1_size Size of the memory block we want to allocate for our process */ SALIS_API void sal_proc_create(uint32 address, uint32 mb1_size); -/** Kill process on bottom of reaper queue. +/** +* Kill process on bottom of reaper queue. */ SALIS_API void sal_proc_kill(void); + +/******************************* +* PRIVATES * +*******************************/ + +void _sal_proc_init(void); +void _sal_proc_quit(void); +void _sal_proc_load_from(FILE *file); +void _sal_proc_save_into(FILE *file); void _sal_proc_cycle(void); #endif -- cgit v1.2.1