From 8acd20fe4f72d27fae52c13df41f18f00d982bba Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Fri, 9 Mar 2012 19:04:00 -0800 Subject: [PATCH] libthreads: export thread_yield() We export this for now. The function will need to change for long-term exported use though. --- libthreads.c | 2 +- libthreads.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libthreads.c b/libthreads.c index 8bdd76e..660e19d 100644 --- a/libthreads.c +++ b/libthreads.c @@ -54,7 +54,7 @@ static int thread_swap(struct thread *old, struct thread *new) return swapcontext(&old->context, &new->context); } -static int thread_yield() +int thread_yield(void) { struct thread *old, *next; diff --git a/libthreads.h b/libthreads.h index 0201ea6..1e2df96 100644 --- a/libthreads.h +++ b/libthreads.h @@ -14,6 +14,7 @@ struct thread { int thread_create(struct thread *t, void (*start_routine), void *arg); void thread_join(struct thread *t); +int thread_yield(void); struct thread *thread_current(void); #endif /* __LIBTHREADS_H__ */ -- 2.34.1