Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/i386 Partially explain the magick in proc_tram...



details:   https://anonhg.NetBSD.org/src/rev/b0411523e286
branches:  trunk
changeset: 525294:b0411523e286
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Tue Apr 09 16:41:08 2002 +0000

description:
Partially explain the magick in proc_trampoline().

diffstat:

 sys/arch/i386/i386/locore.s |  15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diffs (36 lines):

diff -r d1780de9007f -r b0411523e286 sys/arch/i386/i386/locore.s
--- a/sys/arch/i386/i386/locore.s       Tue Apr 09 16:29:25 2002 +0000
+++ b/sys/arch/i386/i386/locore.s       Tue Apr 09 16:41:08 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.253 2002/04/09 16:29:25 mycroft Exp $     */
+/*     $NetBSD: locore.s,v 1.254 2002/04/09 16:41:08 mycroft Exp $     */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -703,6 +703,14 @@
 
        call    _C_LABEL(main)
 
+/*
+ * void proc_trampoline(void);
+ * This is a trampoline function pushed onto the stack of a newly created
+ * process in order to do some additional setup.  The trampoline is entered by
+ * cpu_switch()ing to the process, so we abuse the callee-saved registers used
+ * by cpu_switch() to store the information about the stub to call.
+ * NOTE: This function does not have a normal calling sequence!
+ */
 /* LINTSTUB: Func: void proc_trampoline(void) */
 NENTRY(proc_trampoline)
        pushl   %ebx
@@ -1610,6 +1618,11 @@
        pushl   %eax
        lret
 
+/*****************************************************************************/
+
+/*
+ * These functions are primarily used by DDB.
+ */
 
 /* LINTSTUB: Func: int setjmp (label_t *l) */
 ENTRY(setjmp)



Home | Main Index | Thread Index | Old Index