From: Brian Norris Date: Sat, 10 Mar 2012 03:04:00 +0000 (-0800) Subject: libthreads: export thread_yield() X-Git-Tag: pldi2013~602 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8acd20fe4f72d27fae52c13df41f18f00d982bba;p=model-checker.git libthreads: export thread_yield() We export this for now. The function will need to change for long-term exported use though. --- 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__ */