mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
[kernel] Support handle tag directly on syscalls
The "handle" tag on syscall parameters causes syscall_verify.cpp to pass the resulting object as a obj::handle* instead of directly as an object pointer. Now the handle tag is supported directly on the syscall itself as well, causing the "self" object to be passed as a handle pointer.
This commit is contained in:
@@ -94,12 +94,16 @@ for id, scope, method in syscalls.methods:
|
|||||||
|
|
||||||
elif not method.static:
|
elif not method.static:
|
||||||
argdefs.append(("j6_handle_t", "self"))
|
argdefs.append(("j6_handle_t", "self"))
|
||||||
cxxargdefs.append(f"obj::{scope.cname} *self")
|
|
||||||
args.append("self_obj")
|
|
||||||
|
|
||||||
type = f"obj::{scope.cname} *"
|
if "handle" in method.options:
|
||||||
|
args.append("self_handle")
|
||||||
|
cxxargdefs.append(f"obj::handle *self_handle")
|
||||||
|
else:
|
||||||
|
args.append("self_obj")
|
||||||
|
cxxargdefs.append(f"obj::{scope.cname} *self")
|
||||||
|
objparams.append((f"obj::{scope.cname} *", "self"))
|
||||||
|
|
||||||
handles.append((scope.cname, "self", get_caps(method.options, scope)))
|
handles.append((scope.cname, "self", get_caps(method.options, scope)))
|
||||||
objparams.append((type, "self"))
|
|
||||||
|
|
||||||
for param in method.params:
|
for param in method.params:
|
||||||
needs_obj = param.type.needs_object(param.options)
|
needs_obj = param.type.needs_object(param.options)
|
||||||
|
|||||||
Reference in New Issue
Block a user