From 2b3cfa9f8df3446f3a112e472c5d98013dcf066a Mon Sep 17 00:00:00 2001 From: abdul124 Date: Fri, 30 Aug 2024 16:54:07 +0800 Subject: [PATCH] firmware: remove the duplicate test_exception_id_sync --- artiq/firmware/ksupport/eh_artiq.rs | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/artiq/firmware/ksupport/eh_artiq.rs b/artiq/firmware/ksupport/eh_artiq.rs index 68994af0a..190ee735f 100644 --- a/artiq/firmware/ksupport/eh_artiq.rs +++ b/artiq/firmware/ksupport/eh_artiq.rs @@ -388,29 +388,3 @@ pub extern "C-unwind" fn test_exception_id_sync(exn_id: u32) { }; unsafe { raise(&exn) }; } - -/// Takes as input exception id from host -/// Generates a new exception with: -/// * `id` set to `exn_id` -/// * `message` set to corresponding exception name from `EXCEPTION_ID_LOOKUP` -/// -/// The message is matched on host to ensure correct exception is being referred -/// This test checks the synchronization of exception ids for runtime errors -#[no_mangle] -pub extern "C-unwind" fn test_exception_id_sync(exn_id: u32) { - let message = EXCEPTION_ID_LOOKUP - .iter() - .find_map(|&(name, id)| if id == exn_id { Some(name) } else { None }) - .unwrap_or("unallocated internal exception id"); - - let exn = Exception { - id: exn_id, - file: file!().as_c_slice(), - line: 0, - column: 0, - function: "test_exception_id_sync".as_c_slice(), - message: message.as_c_slice(), - param: [0, 0, 0] - }; - unsafe { raise(&exn) }; -}