libmango: add kern_handle_control syscall

This commit is contained in:
2026-04-01 18:40:58 +01:00
parent b8d3125233
commit 3c494f0c4d
3 changed files with 13 additions and 0 deletions
+6
View File
@@ -12,5 +12,11 @@ extern kern_status_t kern_handle_transfer(
kern_handle_t dest_handle, kern_handle_t dest_handle,
unsigned int mode, unsigned int mode,
kern_handle_t *out_handle); kern_handle_t *out_handle);
extern kern_status_t kern_handle_control(
kern_handle_t task,
kern_handle_t handle,
uint32_t set_mask,
uint32_t clear_mask,
uint32_t *out_flags);
#endif #endif
+1
View File
@@ -51,5 +51,6 @@
#define SYS_FUTEX_WAKE 48 #define SYS_FUTEX_WAKE 48
#define SYS_KERN_OBJECT_QUERY 49 #define SYS_KERN_OBJECT_QUERY 49
#define SYS_TASK_DUPLICATE 50 #define SYS_TASK_DUPLICATE 50
#define SYS_KERN_HANDLE_CONTROL 51
#endif #endif
+6
View File
@@ -28,6 +28,12 @@
#define THREAD_CFG_FSBASE 0x20001u #define THREAD_CFG_FSBASE 0x20001u
#define THREAD_CFG_GSBASE 0x20002u #define THREAD_CFG_GSBASE 0x20002u
/* user-defined flags that can be set on handles */
#define KERN_HANDLE_FLAG0 0x10000000UL
#define KERN_HANDLE_FLAG1 0x20000000UL
#define KERN_HANDLE_FLAG2 0x40000000UL
#define KERN_HANDLE_FLAG3 0x80000000UL
/* maximum number of handles that can be sent in a single message */ /* maximum number of handles that can be sent in a single message */
#define KERN_MSG_MAX_HANDLES 64 #define KERN_MSG_MAX_HANDLES 64