Skip to content

Commit 8fb8742

Browse files
committed
Merge pull request #1627 from tari/1201-example-fix
Correct example in 1201
2 parents a4a22d7 + 0496c69 commit 8fb8742

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

text/1201-naked-fns.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ use std::sync::atomic::{self, AtomicUsize, Ordering};
144144

145145
#[naked]
146146
#[cfg(target_arch="x86")]
147-
unsafe fn isr_3() {
147+
unsafe extern "C" fn isr_3() {
148148
asm!("pushad
149149
call increment_breakpoint_count
150150
popad
@@ -159,7 +159,7 @@ pub fn increment_breakpoint_count() {
159159
bp_count.fetch_add(1, Ordering::Relaxed);
160160
}
161161

162-
fn register_isr(vector: u8, handler: fn() -> ()) { /* ... */ }
162+
fn register_isr(vector: u8, handler: unsafe extern "C" fn() -> ()) { /* ... */ }
163163

164164
fn main() {
165165
register_isr(3, isr_3);

0 commit comments

Comments
 (0)