diff options
| author | Jon Santmyer <jon@jonsantmyer.com> | 2026-10-09 10:24:41 -0400 |
|---|---|---|
| committer | Jon Santmyer <jon@jonsantmyer.com> | 2026-10-09 10:24:41 -0400 |
| commit | cc23ea5a4b38807e79aceb23e6f43e965926618f (patch) | |
| tree | 90142bb44186f4dad7bbd82d3d53655b835c822b /hal/obj.h | |
| parent | 434ddcd907832b1febc7d70e4faa52109c7eb3bd (diff) | |
| download | jove-kernel-cc23ea5a4b38807e79aceb23e6f43e965926618f.tar.gz jove-kernel-cc23ea5a4b38807e79aceb23e6f43e965926618f.tar.bz2 jove-kernel-cc23ea5a4b38807e79aceb23e6f43e965926618f.zip | |
add basic scheduler logic. rename init rootdir indexes
Diffstat (limited to 'hal/obj.h')
| -rw-r--r-- | hal/obj.h | 20 |
1 files changed, 1 insertions, 19 deletions
@@ -17,6 +17,7 @@ typedef struct jove_objdir /*Locks the mutex of the kernel object provided. Returns the locked version. */ jove_owned_obj_t *obj_take(jove_obj_t *obj); jove_owned_obj_t *obj_trytake(jove_obj_t *obj); +jove_obj_t *obj_asunowned(jove_owned_obj_t *obj); /*Unlocks the mutex of the kernel object provided. Returns the unlocked version. */ jove_obj_t *obj_release(jove_owned_obj_t *obj); @@ -32,23 +33,4 @@ void obj_settype(jove_owned_obj_t *obj, uint8_t type); uintmax_t obj_getvalue(jove_owned_obj_t *obj); void obj_setvalue(jove_owned_obj_t *obj, uintmax_t value); -/*Returns the n'th entry of the object directory passed. - * If the passed object is not an objdir, returns NULL and sets errno to EBADOBJ. - * If the passed entry index is out of bounds, returns NULL and sets errno to EOOB.*/ -jove_owned_obj_t *objdir_getlocal(jove_owned_obj_t *objdir_obj, uint16_t entry); -/*Same as objdir_getlocal except does not block if entry obj is taken.*/ -jove_owned_obj_t *objdir_trygetlocal(jove_owned_obj_t *objdir_obj, uint16_t entry); -jove_obj_t objdir_peeklocal(jove_owned_obj_t *objdir_obj, uint16_t entry); - -/*Recursively seeks through an object directory for an object following the passed - * path variable. - * If the path length is zero, returns the passed object. - * If the passed object is not an objdir, returns NULL and sets errno to EBADOBJ. - * If any object excluding the object at the end of the path is not an objdir, - * returns NULL and sets errno to EBADOBJ. - * If any entry in the path is out of bounds, returns NULL and sets errno to EBADOBJ.*/ -jove_owned_obj_t *objdir_getobj(jove_owned_obj_t *objdir_obj, const uint16_t *path, size_t path_len); -/*Same as objdir_getobj but does not block if child objects are locked.*/ -jove_owned_obj_t *objdir_trygetobj(jove_owned_obj_t *objdir_obj, const uint16_t *path, size_t path_len); - #endif |
