From owner-p4-projects Sat Aug 31 19:39:52 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BB0F137B401; Sat, 31 Aug 2002 19:39:40 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6DFAA37B400 for ; Sat, 31 Aug 2002 19:39:40 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D57943E3B for ; Sat, 31 Aug 2002 19:39:40 -0700 (PDT) (envelope-from mini@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g812ddJU074976 for ; Sat, 31 Aug 2002 19:39:39 -0700 (PDT) (envelope-from mini@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g812ddXj074973 for perforce@freebsd.org; Sat, 31 Aug 2002 19:39:39 -0700 (PDT) Date: Sat, 31 Aug 2002 19:39:39 -0700 (PDT) Message-Id: <200209010239.g812ddXj074973@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to mini@freebsd.org using -f From: Jonathan Mini Subject: PERFORCE change 16880 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=16880 Change 16880 by mini@mini_stylus on 2002/08/31 19:39:07 Revert previous change (accidentally committed). Affected files ... .. //depot/projects/kse/sys/kern/kern_thread.c#97 edit Differences ... ==== //depot/projects/kse/sys/kern/kern_thread.c#97 (text+ko) ==== @@ -1,3 +1,4 @@ +//depot/projects/kse/sys/kern/kern_thread.c#95 - edit change 16871 (text+ko) /* * Copyright (C) 2001 Julian Elischer . * All rights reserved. @@ -503,16 +504,13 @@ int discard, error; struct thread_mailbox *tmp; - printf("consider - "); /* * If we are in a critical section, return to this thread. */ tmp = (struct thread_mailbox *)fuword(&ke->ke_mailbox->km_curthread); if ((tmp != NULL) && - (fuword(&tmp->tm_context.uc_flags) & UCF_CRITICAL)) { - printf("CRITICAL - "); + (fuword(&tmp->tm_context.uc_flags) & UCF_CRITICAL)) return (0); - } /* * Save the thread's context, and link it @@ -525,10 +523,8 @@ * Failing to do the KSE operation just defaults * back to synchonous operation, so just return from * the syscall. - */{ - printf("error - "); + */ return (error); - } /* * Decide whether to perfom an upcall now. @@ -550,10 +546,9 @@ * What is OUR priority? The priority of the highest * sycall waiting to be returned? * For now, just let another KSE run (easiest). - */ { - printf("runq - "); + */ discard = 1; - } + /* Make sure the KSE's UTS context is free for use. */ if (fuword(&ke->ke_mailbox->km_context.uc_busy) != 0) /* @@ -561,9 +556,8 @@ * means the UTS is currently running, so switch to it * instead of performing another upcall (abandon this * thread). - */ { - printf("busy - "); - discard = 1; } + */ + discard = 1; /* Discard thread or mark for upcall. */ if (discard) { @@ -579,7 +573,6 @@ * the next upcall to any KSE in this KSEG. * */ - printf("discard\n"); PROC_LOCK(p); mtx_lock_spin(&sched_lock); thread_exit(); /* Abandon current thread. */ @@ -614,22 +607,17 @@ int error; ucontext_t uc; - printf("thread_userret - "); /* * Ensure that we have a spare thread available. */ - if (ke->ke_tdspare == NULL) { - printf("thread_alloc - "); + if (ke->ke_tdspare == NULL) ke->ke_tdspare = thread_alloc(); - } /* * Bound threads need no additional work. */ - if ((td->td_flags & TDF_UNBOUND) == 0) { - printf("bound\n"); + if ((td->td_flags & TDF_UNBOUND) == 0) return (0); - } error = 0; /* @@ -652,7 +640,6 @@ */ CTR3(KTR_PROC, "userret: upcall thread %p (pid %d, %s)", td, p->p_pid, p->p_comm); - printf("upcall - "); /* * Fetch the current UTS context from userland. @@ -697,7 +684,6 @@ * we are committing to go to user space as as this KSE here. */ td->td_flags &= ~TDF_UNBOUND; /* Bind to this user thread. */ - printf("binding\n"); return (error); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message