1
0
Fork 0

provide mockups for all exception functions

This commit is contained in:
Sebastien Bourdeauducq 2020-06-09 12:56:58 +08:00
parent 12c2d658f3
commit b16ec2c6a8
1 changed files with 9 additions and 1 deletions

View File

@ -93,6 +93,10 @@ extern fn rpc_recv(slot: *mut ()) -> usize {
} }
} }
extern fn exception_unimplemented() {
unimplemented!();
}
macro_rules! api { macro_rules! api {
($i:ident) => ({ ($i:ident) => ({
extern { static $i: u8; } extern { static $i: u8; }
@ -126,7 +130,11 @@ fn resolve(required: &[u8]) -> Option<u32> {
api!(rtio_input_data = rtio::input_data), api!(rtio_input_data = rtio::input_data),
api!(rtio_input_timestamped_data = rtio::input_timestamped_data), api!(rtio_input_timestamped_data = rtio::input_timestamped_data),
api!(__artiq_personality = 0), // HACK api!(_Unwind_Resume = exception_unimplemented),
api!(__artiq_personality = exception_unimplemented),
api!(__artiq_raise = exception_unimplemented),
api!(__artiq_reraise = exception_unimplemented),
]; ];
api.iter() api.iter()
.find(|&&(exported, _)| exported.as_bytes() == required) .find(|&&(exported, _)| exported.as_bytes() == required)