1
0
forked from M-Labs/nac3
This commit is contained in:
mwojcik 2024-09-06 16:33:58 +08:00
parent 9c33c4209c
commit 7204513a9f
2 changed files with 9 additions and 2 deletions

View File

@ -112,10 +112,14 @@ def extern(function):
register_function(function)
return function
def rpc(function):
def rpc(function, flags={}):
"""Decorates a function declaration defined by the core device runtime."""
register_function(function)
return function
@wraps(function)
def wrapped(function)
return function
wrapped.__artiq_rpc_flags__ = flags
return wrapped
def kernel(function_or_method):
"""Decorates a function or method to be executed on the core device."""

View File

@ -831,6 +831,9 @@ fn rpc_codegen_callback_fn<'ctx>(
let ptr_type = int8.ptr_type(AddressSpace::default());
let tag_ptr_type = ctx.ctx.struct_type(&[ptr_type.into(), size_type.into()], false);
// println!("obj: {:?}", obj);
println!("fun: {:?}", fun);
let service_id = int32.const_int(fun.1 .0 as u64, false);
// -- setup rpc tags
let mut tag = Vec::new();