From owner-p4-projects Fri Jun 14 18:43:29 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8BEDB37B416; Fri, 14 Jun 2002 18:43:17 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 86CDC37B410 for ; Fri, 14 Jun 2002 18:43:16 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g5F1hGq08806 for perforce@freebsd.org; Fri, 14 Jun 2002 18:43:16 -0700 (PDT) (envelope-from jake@freebsd.org) Date: Fri, 14 Jun 2002 18:43:16 -0700 (PDT) Message-Id: <200206150143.g5F1hGq08806@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to jake@freebsd.org using -f From: Jake Burkholder Subject: PERFORCE change 12957 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=12957 Change 12957 by jake@jake_k7 on 2002/06/14 18:42:17 Compile on sparc64. Affected files ... ... //depot/projects/kse/sys/sparc64/include/kse.h#1 add ... //depot/projects/kse/sys/sparc64/sparc64/genassym.c#26 edit ... //depot/projects/kse/sys/sparc64/sparc64/swtch.s#17 edit ... //depot/projects/kse/sys/sparc64/sparc64/trap.c#29 edit ... //depot/projects/kse/sys/sparc64/sparc64/vm_machdep.c#24 edit Differences ... ==== //depot/projects/kse/sys/sparc64/sparc64/genassym.c#26 (text+ko) ==== @@ -232,6 +232,8 @@ ASSYM(TD_KSTACK, offsetof(struct thread, td_kstack)); ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); ASSYM(TD_PROC, offsetof(struct thread, td_proc)); +ASSYM(TD_STATE, offsetof(struct thread, td_state)); +ASSYM(TDS_RUNNING, TDS_RUNNING); ASSYM(PCB_SIZEOF, sizeof(struct pcb)); ASSYM(PCB_FPSTATE, offsetof(struct pcb, pcb_fpstate)); ==== //depot/projects/kse/sys/sparc64/sparc64/swtch.s#17 (text+ko) ==== @@ -109,6 +109,9 @@ stx %o0, [PCPU(CURTHREAD)] stx %o1, [PCPU(CURPCB)] + mov TDS_RUNNING, %o2 + stw %o2, [%o0 + TD_STATE] + SET(sched_lock, %o3, %o2) stx %o0, [%o2 + MTX_LOCK] ==== //depot/projects/kse/sys/sparc64/sparc64/trap.c#29 (text+ko) ==== @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -190,6 +191,10 @@ td->td_frame = tf; if (td->td_ucred != p->p_ucred) cred_update_thread(td); + if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) { + thread_exit(); + /* NOTREACHED */ + } } else { sticks = 0; if ((type & ~T_KERNEL) != T_BREAKPOINT) @@ -528,6 +533,23 @@ td->td_frame = tf; if (td->td_ucred != p->p_ucred) cred_update_thread(td); + if (p->p_flag & P_KSES) { + /* + * If we are doing a syscall in a KSE environment, + * note where our mailbox is. There is always the + * possibility that we could do this lazily (in sleep()), + * but for now do it every time. + */ + td->td_mailbox = (void *)fuword((caddr_t)td->td_kse->ke_mailbox + + offsetof(struct kse_mailbox, kmbx_current_thread)); + if ((td->td_mailbox == NULL) || + (td->td_mailbox == (void *)-1)) { + td->td_mailbox = NULL; /* single thread it.. */ + td->td_flags &= ~TDF_UNBOUND; + } else { + td->td_flags |= TDF_UNBOUND; + } + } code = tf->tf_global[1]; /* ==== //depot/projects/kse/sys/sparc64/sparc64/vm_machdep.c#24 (text+ko) ==== @@ -86,6 +86,42 @@ } } +void +cpu_thread_exit(struct thread *td) +{ +} + +void +cpu_thread_setup(struct thread *td) +{ +} + +void +cpu_save_upcall(struct thread *td, struct kse *newkse) +{ +} + +void +cpu_set_upcall(struct thread *td, void *pcb) +{ +} + +void +cpu_set_args(struct thread *td, struct kse *ke) +{ +} + +void +cpu_free_kse_mdstorage(struct kse *ke) +{ +} + +int +cpu_export_context(struct thread *td) +{ + return (0); +} + /* * Finish a fork operation, with process p2 nearly set up. * Copy and update the pcb, set up the stack so that the child To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message