Source-Changes-HG archive

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

[src/trunk]: src/lib/libpthread Set a thread's state to RUNNABLE when yielding.



details:   https://anonhg.NetBSD.org/src/rev/ae9e8985faf1
branches:  trunk
changeset: 542464:ae9e8985faf1
user:      nathanw <nathanw%NetBSD.org@localhost>
date:      Thu Jan 30 01:00:58 2003 +0000

description:
Set a thread's state to RUNNABLE when yielding.

diffstat:

 lib/libpthread/pthread_run.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r fa85d7402fc7 -r ae9e8985faf1 lib/libpthread/pthread_run.c
--- a/lib/libpthread/pthread_run.c      Thu Jan 30 00:36:32 2003 +0000
+++ b/lib/libpthread/pthread_run.c      Thu Jan 30 01:00:58 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pthread_run.c,v 1.3 2003/01/19 21:58:24 thorpej Exp $  */
+/*     $NetBSD: pthread_run.c,v 1.4 2003/01/30 01:00:58 nathanw Exp $  */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -70,6 +70,7 @@
                self = pthread__self();
                SDPRINTF(("(sched_yield %p) yielding\n", self));
                pthread_spinlock(self, &pthread__runqueue_lock);
+               self->pt_state = PT_STATE_RUNNABLE;
                PTQ_INSERT_TAIL(&pthread__runqueue, self, pt_runq);
                /*
                 * There will always be at least one thread on the runqueue,



Home | Main Index | Thread Index | Old Index