summaryrefslogtreecommitdiffstats
path: root/hal/obj.h
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2026-09-17 11:11:20 -0400
committerJon Santmyer <jon@jonsantmyer.com>2026-09-17 11:11:20 -0400
commit13adbc58eb9f5eb5d6f0e4454bd005e9adbb47c8 (patch)
treea15e55bc70c60d3faa053db3b7b9a17fe75589bc /hal/obj.h
parenta783cc865f1f261c20f6ef55cb37d4839f519865 (diff)
downloadjove-kernel-13adbc58eb9f5eb5d6f0e4454bd005e9adbb47c8.tar.gz
jove-kernel-13adbc58eb9f5eb5d6f0e4454bd005e9adbb47c8.tar.bz2
jove-kernel-13adbc58eb9f5eb5d6f0e4454bd005e9adbb47c8.zip
make syscall use non-locking mutexes
Diffstat (limited to 'hal/obj.h')
-rw-r--r--hal/obj.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/hal/obj.h b/hal/obj.h
index 151f4eb..68f4bdc 100644
--- a/hal/obj.h
+++ b/hal/obj.h
@@ -16,6 +16,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);
/*Unlocks the mutex of the kernel object provided. Returns the unlocked version. */
jove_obj_t *obj_release(jove_owned_obj_t *obj);
@@ -35,6 +36,8 @@ void obj_setvalue(jove_owned_obj_t *obj, uintmax_t value);
* 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
@@ -45,5 +48,7 @@ jove_obj_t objdir_peeklocal(jove_owned_obj_t *objdir_obj, uint16_t entry);
* 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