#### so that this module appears at the very beginning of the kernel
#### image, and then using that as the entry point.
-.globl start
.section .start
-
+
+.globl start
+.func start
+ # Call main.
start: call main
- # If main returns, spin.
+ # main() should not return, but if it does, spin.
1: jmp 1b
+.endfunc
#### restore the registers. As part of switching stacks we record the
#### current stack pointer in CUR's thread structure.
- .intel_syntax noprefix
+.intel_syntax noprefix
-.globl switch_threads
+.globl switch_threads
+.func switch_threads
switch_threads:
# Save caller's register state.
#
pop ebp
pop ebx
ret
+.endfunc
.globl switch_entry
+.func switch_entry
switch_entry:
# Discard switch_threads() arguments.
add esp, 8
# Start thread proper.
ret
+.endfunc