- make-uefi-iso.sh: UEFI ISO image builder - test_boot.S, test_boot.ld: test boot assembly and linker script - eim_config.toml: EIM (External Interface Module) configuration - edk2-ovmf RPM for UEFI firmware - GAP_ANALYSIS_PIKEOS_PARITY.md: PikeOS parity gap analysis
56 lines
1.4 KiB
C
56 lines
1.4 KiB
C
/*
|
|
* UniversalisOS Microkernel — Kernel Object Base
|
|
*
|
|
* All kernel objects (task, sem, mutex, queue, event, timer)
|
|
* embed uos_object_t as their first member.
|
|
*/
|
|
#ifndef UOS_OBJECT_H
|
|
#define UOS_OBJECT_H
|
|
|
|
#include "uos_types.h"
|
|
#include "uos_config.h"
|
|
#include "uos_compiler.h"
|
|
|
|
/* === Object types === */
|
|
typedef enum {
|
|
UOS_OBJ_TASK = 0x01,
|
|
UOS_OBJ_SEM = 0x02,
|
|
UOS_OBJ_MUTEX = 0x03,
|
|
UOS_OBJ_QUEUE = 0x04,
|
|
UOS_OBJ_EVENT = 0x05,
|
|
UOS_OBJ_TIMER = 0x06,
|
|
} uos_obj_type_t;
|
|
|
|
/* === Object flags === */
|
|
#define UOS_OBJ_FLAG_STATIC 0x01 /* Statically allocated */
|
|
#define UOS_OBJ_FLAG_DYNAMIC 0x02 /* Dynamically allocated */
|
|
|
|
/* === Base object === */
|
|
typedef struct uos_object {
|
|
uos_obj_type_t type;
|
|
const char* name;
|
|
uint8_t flags;
|
|
#if UOS_TIER >= 1
|
|
struct uos_object* next; /* Object registry linked list */
|
|
#endif
|
|
} uos_object_t;
|
|
|
|
/* === Object registry (Tier 1+ only) === */
|
|
#if UOS_TIER >= 1
|
|
void uos_obj_register(uos_object_t* obj);
|
|
void uos_obj_unregister(uos_object_t* obj);
|
|
uos_object_t* uos_obj_find(const char* name, uos_obj_type_t type);
|
|
#endif
|
|
|
|
/* === Inline helpers === */
|
|
UOS_INLINE void uos_obj_init(uos_object_t* obj, uos_obj_type_t type,
|
|
const char* name, uint8_t flags) {
|
|
obj->type = type;
|
|
obj->name = name;
|
|
obj->flags = flags;
|
|
#if UOS_TIER >= 1
|
|
obj->next = NULL;
|
|
#endif
|
|
}
|
|
|
|
#endif /* UOS_OBJECT_H */
|