Skip to content

Commit 644809e

Browse files
strakephil-opp
authored andcommitted
privatize spin label (rust-osdev#41)
1 parent 2eefe09 commit 644809e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ global_asm!(include_str!("video_mode/vga_320x200.s"));
3737
global_asm!(include_str!("video_mode/vga_text_80x25.s"));
3838

3939
unsafe fn context_switch(boot_info: VirtAddr, entry_point: VirtAddr, stack_pointer: VirtAddr) -> ! {
40-
asm!("jmp $1; context_switch_spin: jmp context_switch_spin" :: "{rsp}"(stack_pointer), "r"(entry_point), "{rdi}"(boot_info) :: "intel");
40+
asm!("jmp $1; ${:private}.spin.${:uid}: jmp ${:private}.spin.${:uid}" ::
41+
"{rsp}"(stack_pointer), "r"(entry_point), "{rdi}"(boot_info) :: "intel");
4142
::core::hint::unreachable_unchecked()
4243
}
4344

0 commit comments

Comments
 (0)