From 616bcfcf0c4889c24e5d66a1ed6bd2ec8f0814e5 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Thu, 29 Mar 2012 19:34:12 +0200 Subject: [PATCH] Move the definition of sched_yield() up for scope reasons. --- src/c/threads/queue.d | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/c/threads/queue.d b/src/c/threads/queue.d index c4471f72c..9239f09e9 100644 --- a/src/c/threads/queue.d +++ b/src/c/threads/queue.d @@ -23,6 +23,14 @@ #define print_lock(a,b,...) (void)0 +#ifndef HAVE_SCHED_H +static int +sched_yield() +{ + ecl_musleep(0.0, 1); +} +#endif + void ECL_INLINE ecl_get_spinlock(cl_env_ptr the_env, cl_object *lock) { @@ -33,14 +41,6 @@ ecl_get_spinlock(cl_env_ptr the_env, cl_object *lock) } } -#ifndef HAVE_SCHED_H -int -sched_yield() -{ - ecl_musleep(0.0, 1); -} -#endif - void ECL_INLINE ecl_giveup_spinlock(cl_object *lock) {