summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrsc <rsc>2007-08-27 23:32:16 +0000
committerrsc <rsc>2007-08-27 23:32:16 +0000
commit19b42cc0787da77516c0edadd6f206a09c4d936d (patch)
tree1d054221ddae7061b5b05b82d1ad9f135a363b02
parent558ab49f13634d972e956020a12d14fdb1416b94 (diff)
downloadxv6-labs-19b42cc0787da77516c0edadd6f206a09c4d936d.tar.gz
xv6-labs-19b42cc0787da77516c0edadd6f206a09c4d936d.tar.bz2
xv6-labs-19b42cc0787da77516c0edadd6f206a09c4d936d.zip
Rename main0 to main.
-rw-r--r--Makefile2
-rw-r--r--defs.h2
-rw-r--r--initcode.S1
-rw-r--r--main.c4
4 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 31bc946..cde81e5 100644
--- a/Makefile
+++ b/Makefile
@@ -60,7 +60,7 @@ kernel : $(OBJS) bootother.S initcode.S
$(LD) -N -e start -Ttext 0 -o initcode.out initcode.o
$(OBJCOPY) -S -O binary initcode.out initcode
$(OBJDUMP) -S initcode.o > initcode.asm
- $(LD) -Ttext 0x100000 -e main0 -o kernel $(OBJS) -b binary initcode bootother
+ $(LD) -Ttext 0x100000 -e main -o kernel $(OBJS) -b binary initcode bootother
$(OBJDUMP) -S kernel > kernel.asm
$(OBJDUMP) -t kernel | awk '/SYMBOL TABLE/ { go=1; next } go {print $$1, $$NF}' >kernel.sym
diff --git a/defs.h b/defs.h
index 8c4c665..7ed89ef 100644
--- a/defs.h
+++ b/defs.h
@@ -102,7 +102,7 @@ void proc_exit(void);
int proc_kill(int);
int proc_wait(void);
void procdump(void);
-void scheduler(void);
+void scheduler(void) __attribute__((noreturn));
void setupsegs(struct proc*);
void sleep(void*, struct spinlock*);
void userinit(void);
diff --git a/initcode.S b/initcode.S
index 3b41c6e..984d29f 100644
--- a/initcode.S
+++ b/initcode.S
@@ -4,6 +4,7 @@
#include "traps.h"
# exec(init, argv)
+.globl start
start:
pushl $argv
pushl $init
diff --git a/main.c b/main.c
index 570c164..3508ecc 100644
--- a/main.c
+++ b/main.c
@@ -10,8 +10,8 @@ extern char edata[], end[];
void bootothers(void);
// Bootstrap processor starts running C code here.
-void
-main0(void)
+int
+main(void)
{
int i;
static volatile int bcpu; // cannot be on stack