X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fthread.c;h=6489d7d9c82d6fffdf2ecdcb4cc2edd792598814;hb=91e1d65670542ceb7c177423f25b53d250c9d9cb;hp=7c85b3e4dbb36328b5b264bd77c76df1b747927e;hpb=26e8f33d8639e4de75e59e3aa30bbd7478d51a69;p=sbcl.git diff --git a/src/runtime/thread.c b/src/runtime/thread.c index 7c85b3e..6489d7d 100644 --- a/src/runtime/thread.c +++ b/src/runtime/thread.c @@ -235,7 +235,6 @@ create_cleanup_thread(struct thread *thread_to_be_cleaned_up) (os_vm_address_t) thread_to_be_cleaned_up->os_address; result = pthread_create(&thread, NULL, cleanup_thread, freeable); gc_assert(result == 0); - sched_yield(); } } @@ -365,13 +364,9 @@ create_thread_struct(lispobj initial_function) { void *spaces=0; void *aligned_spaces=0; #ifdef LISP_FEATURE_SB_THREAD - int i; + unsigned int i; #endif -#ifdef CREATE_CLEANUP_THREAD - /* Give a chance for cleanup threads to run. */ - sched_yield(); -#endif /* May as well allocate all the spaces at once: it saves us from * having to decide what to do if only some of the allocations * succeed. SPACES must be page-aligned, since the GC expects the @@ -734,3 +729,13 @@ void gc_start_the_world() FSHOW_SIGNAL((stderr,"/gc_start_the_world:end\n")); } #endif + +int +thread_yield() +{ +#ifdef LISP_FEATURE_SB_THREAD + return sched_yield(); +#else + return 0; +#endif +}