summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread/thr_kern.c
diff options
context:
space:
mode:
authorJohn Birrell <jb@FreeBSD.org>1998-11-15 09:58:26 +0000
committerJohn Birrell <jb@FreeBSD.org>1998-11-15 09:58:26 +0000
commite7b7b3f3de2ea8c389c26f118e0c1bd750a89299 (patch)
treeb2ece7fd6c808e5d498f0b6d015d95b8a82d4f32 /lib/libpthread/thread/thr_kern.c
parent18c434c8f2a7c39c4d1087771e10fa0f262e9924 (diff)
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_kern.c')
-rw-r--r--lib/libpthread/thread/thr_kern.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c
index 22746c7d211e..3a6966bad5bf 100644
--- a/lib/libpthread/thread/thr_kern.c
+++ b/lib/libpthread/thread/thr_kern.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: uthread_kern.c,v 1.13 1998/09/30 06:36:56 jb Exp $
+ * $Id: uthread_kern.c,v 1.14 1998/10/09 19:01:30 dt Exp $
*
*/
#include <errno.h>
@@ -616,6 +616,22 @@ _thread_kern_sched_state(enum pthread_state state, char *fname, int lineno)
return;
}
+void
+_thread_kern_sched_state_unlock(enum pthread_state state,
+ spinlock_t *lock, char *fname, int lineno)
+{
+ /* Change the state of the current thread: */
+ _thread_run->state = state;
+ _thread_run->fname = fname;
+ _thread_run->lineno = lineno;
+
+ _SPINUNLOCK(lock);
+
+ /* Schedule the next thread that is ready: */
+ _thread_kern_sched(NULL);
+ return;
+}
+
static void
_thread_kern_select(int wait_reqd)
{