diff options
author | peter <peter@FreeBSD.org> | 1999-05-09 19:01:49 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-05-09 19:01:49 +0000 |
commit | 78e46d3bffd4864e4d79f7068700ba5b86e5f377 (patch) | |
tree | b96798a1646b729f3616b431ee2abb096a7af96b | |
parent | 1913ab44290fa7c5b2db3501c426a8569fbf542c (diff) | |
download | FreeBSD-src-78e46d3bffd4864e4d79f7068700ba5b86e5f377.zip FreeBSD-src-78e46d3bffd4864e4d79f7068700ba5b86e5f377.tar.gz |
s/main/mi_startup/ for the kernel entry point so that egcs doesn't get
upset about it (and generate things like __main() calls that are reserved
for main()). Renaming was phk's suggestion, but I'd already thought about
it too. (phk liked my suggested name tada() but I decided against it :-)
Reviewed by: phk
-rw-r--r-- | sys/amd64/amd64/locore.S | 4 | ||||
-rw-r--r-- | sys/amd64/amd64/locore.s | 4 | ||||
-rw-r--r-- | sys/i386/i386/locore.s | 4 | ||||
-rw-r--r-- | sys/i386/include/asnames.h | 4 | ||||
-rw-r--r-- | sys/kern/init_main.c | 19 |
5 files changed, 14 insertions, 21 deletions
diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S index 63f74cc..df42eaa 100644 --- a/sys/amd64/amd64/locore.S +++ b/sys/amd64/amd64/locore.S @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)locore.s 7.3 (Berkeley) 5/13/91 - * $Id: locore.s,v 1.120 1999/01/31 02:04:43 kato Exp $ + * $Id: locore.s,v 1.121 1999/04/28 01:03:20 luoqi Exp $ * * originally from: locore.s, by William F. Jolitz * @@ -388,7 +388,7 @@ begin: subl $(13*4),%esp /* space for rest of registers */ pushl %esp /* call main with frame pointer */ - call _main /* autoconfiguration, mountroot etc */ + call _mi_startup /* autoconfiguration, mountroot etc */ hlt /* never returns to here */ diff --git a/sys/amd64/amd64/locore.s b/sys/amd64/amd64/locore.s index 63f74cc..df42eaa 100644 --- a/sys/amd64/amd64/locore.s +++ b/sys/amd64/amd64/locore.s @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)locore.s 7.3 (Berkeley) 5/13/91 - * $Id: locore.s,v 1.120 1999/01/31 02:04:43 kato Exp $ + * $Id: locore.s,v 1.121 1999/04/28 01:03:20 luoqi Exp $ * * originally from: locore.s, by William F. Jolitz * @@ -388,7 +388,7 @@ begin: subl $(13*4),%esp /* space for rest of registers */ pushl %esp /* call main with frame pointer */ - call _main /* autoconfiguration, mountroot etc */ + call _mi_startup /* autoconfiguration, mountroot etc */ hlt /* never returns to here */ diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s index 63f74cc..df42eaa 100644 --- a/sys/i386/i386/locore.s +++ b/sys/i386/i386/locore.s @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)locore.s 7.3 (Berkeley) 5/13/91 - * $Id: locore.s,v 1.120 1999/01/31 02:04:43 kato Exp $ + * $Id: locore.s,v 1.121 1999/04/28 01:03:20 luoqi Exp $ * * originally from: locore.s, by William F. Jolitz * @@ -388,7 +388,7 @@ begin: subl $(13*4),%esp /* space for rest of registers */ pushl %esp /* call main with frame pointer */ - call _main /* autoconfiguration, mountroot etc */ + call _mi_startup /* autoconfiguration, mountroot etc */ hlt /* never returns to here */ diff --git a/sys/i386/include/asnames.h b/sys/i386/include/asnames.h index 155607a..6f79186 100644 --- a/sys/i386/include/asnames.h +++ b/sys/i386/include/asnames.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: asnames.h,v 1.32 1999/04/28 01:03:57 luoqi Exp $ + * $Id: asnames.h,v 1.33 1999/05/06 09:44:52 bde Exp $ */ #ifndef _MACHINE_ASNAMES_H_ @@ -268,9 +268,9 @@ #define _lapic lapic #define _linux_sigcode linux_sigcode #define _linux_szsigcode linux_szsigcode -#define _main main #define _mask8254 mask8254 #define _maskRTC maskRTC +#define _mi_startup mi_startup #define _microuptime microuptime #define _mp_gdtbase mp_gdtbase #define _mp_lock mp_lock diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 4905649..20b61f9 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * @(#)init_main.c 8.9 (Berkeley) 1/21/94 - * $Id: init_main.c,v 1.118 1999/05/05 12:20:23 jb Exp $ + * $Id: init_main.c,v 1.119 1999/05/07 17:37:08 des Exp $ */ #include "opt_devfs.h" @@ -76,8 +76,7 @@ extern struct linker_set sysinit_set; /* XXX */ -extern void __main __P((void)); -extern void main __P((void *framep)); +extern void mi_startup __P((void *framep)); /* Components of the first process -- never freed. */ static struct session session0; @@ -103,17 +102,11 @@ SYSCTL_STRUCT(_kern, KERN_BOOTTIME, boottime, CTLFLAG_RD, /* * Promiscuous argument pass for start_init() * - * This is a kludge because we use a return from main() rather than a call + * This is a kludge because we use a return from mi_startup() rather than a call * to a new routine in locore.s to kick the kernel alive from locore.s. */ static void *init_framep; - -#if __GNUC__ >= 2 -void __main() {} -#endif - - /* * This ensures that there is at least one entry so that the sysinit_set * symbol is not undefined. A sybsystem ID of SI_SUB_DUMMY is never @@ -180,7 +173,7 @@ sysinit_add(set) * module. Finally, it allows for optional "kernel threads". */ void -main(framep) +mi_startup(framep) void *framep; { @@ -271,7 +264,7 @@ restart: /* * Start a kernel process. This is called after a fork() call in - * main() in the file kern/init_main.c. + * mi_startup() in the file kern/init_main.c. * * This function is used to start "internal" daemons. */ @@ -692,7 +685,7 @@ start_init(p) * Now try to exec the program. If can't for any reason * other than it doesn't exist, complain. * - * Otherwise return to main() which returns to btext + * Otherwise return to mi_startup() which returns to btext * which completes the system startup. */ if ((error = execve(p, &args)) == 0) |