Example #1
0
static void *
thread_start_func_1(void *th_ptr)
{
#if USE_THREAD_CACHE
  thread_start:
#endif
    {
	rb_thread_t *th = th_ptr;
	VALUE stack_start;

#ifndef __CYGWIN__
	native_thread_init_stack(th);
#endif
	native_thread_init(th);
	/* run */
	thread_start_func_2(th, &stack_start, rb_ia64_bsp());
    }
#if USE_THREAD_CACHE
    if (1) {
	/* cache thread */
	rb_thread_t *th;
	if ((th = register_cached_thread_and_wait()) != 0) {
	    th_ptr = (void *)th;
	    th->thread_id = pthread_self();
	    goto thread_start;
	}
    }
#endif
    return 0;
}
Example #2
0
static void *
thread_start_func_1(void *th_ptr)
{
#if USE_THREAD_CACHE
thread_start:
#endif
    {
        rb_thread_t *th = th_ptr;
        VALUE stack_start;

        void *p = rho_nativethread_start();
        /* run */
        thread_start_func_2(th, &stack_start, rb_ia64_bsp());
        rho_nativethread_end(p);
    }
#if USE_THREAD_CACHE
    if (1) {
        /* cache thread */
        rb_thread_t *th;
        static rb_thread_t *register_cached_thread_and_wait(void);
        if ((th = register_cached_thread_and_wait()) != 0) {
            th_ptr = (void *)th;
            th->thread_id = pthread_self();
            goto thread_start;
        }
    }
#endif
    return 0;
}
static void *
thread_start_func_1(void *th_ptr)
{
#if WITH_OBJC
    rb_objc_gc_register_thread();
    rb_objc_release((void *)th_ptr);
#endif
#if USE_THREAD_CACHE
thread_start:
#endif
    {
        rb_thread_t *th = th_ptr;
        VALUE stack_start;

        /* run */
        thread_start_func_2(th, &stack_start, rb_ia64_bsp());
    }
#if USE_THREAD_CACHE
    if (1) {
        /* cache thread */
        rb_thread_t *th;
        static rb_thread_t *register_cached_thread_and_wait(void);
        if ((th = register_cached_thread_and_wait()) != 0) {
            th_ptr = (void *)th;
            th->thread_id = pthread_self();
            goto thread_start;
        }
    }
#endif
#if WITH_OBJC
    rb_objc_gc_unregister_thread();
#endif
    return 0;
}
Example #4
0
static void *
thread_start_func_1(void *th_ptr)
{
    scribe_end();

#if USE_THREAD_CACHE
  thread_start:
#endif
    {
	rb_thread_t *th = th_ptr;
#if !defined USE_NATIVE_THREAD_INIT
	VALUE stack_start;
#endif

#if defined USE_NATIVE_THREAD_INIT
	native_thread_init_stack(th);
#endif
	native_thread_init(th);
	/* run */
#if defined USE_NATIVE_THREAD_INIT
	thread_start_func_2(th, th->machine_stack_start, rb_ia64_bsp());
#else
	thread_start_func_2(th, &stack_start, rb_ia64_bsp());
#endif
    }
#if USE_THREAD_CACHE
    if (1) {
	/* cache thread */
	rb_thread_t *th;
	if ((th = register_cached_thread_and_wait()) != 0) {
	    th_ptr = (void *)th;
	    th->thread_id = pthread_self();
	    goto thread_start;
	}
    }
#endif

    scribe_begin();
    return 0;
}