Skip to content

Commit

Permalink
* thread_pthread.ci (thread_start_func_2): not use a directive inside
Browse files Browse the repository at this point in the history
  a macro argument.  [ruby-talk:258763]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Jul 12, 2007
1 parent 2e4f2aa commit 0fcf8e1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 20 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
Thu Jul 12 10:19:16 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>

* thread_pthread.ci (thread_start_func_2): not use a directive inside
a macro argument. [ruby-talk:258763]

Thu Jul 12 05:32:28 2007 NAKAMURA Usaku <usa@ruby-lang.org>

* include/ruby/ruby.h (FIX2ULONG): drop sign bit for LLP64 platform.
Expand Down
12 changes: 7 additions & 5 deletions thread.c
Expand Up @@ -137,6 +137,12 @@ rb_thread_s_debug_set(VALUE self, VALUE val)
#define thread_debug if(0)printf
#endif

#ifndef __ia64
#define thread_start_func_2(th, st, rst) thread_start_func_2(th, st)
#endif
NOINLINE(static int thread_start_func_2(rb_thread_t *th, VALUE *stack_start,
VALUE *register_stack_start));

#if defined(_WIN32)
#include "thread_win32.ci"

Expand Down Expand Up @@ -272,11 +278,7 @@ thread_cleanup_func(void *th_ptr)
}

static int
thread_start_func_2(rb_thread_t *th, VALUE *stack_start
#ifdef __ia64
, VALUE *register_stack_start
#endif
)
thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_start)
{
int state;
VALUE args = th->first_args;
Expand Down
12 changes: 1 addition & 11 deletions thread_pthread.ci
Expand Up @@ -86,12 +86,6 @@ Init_native_thread()
posix_signal(SIGVTALRM, null_func);
}

NOINLINE(static int thread_start_func_2(rb_thread_t *th, VALUE *stack_start
#ifdef __ia64
, VALUE *register_stack_start
#endif
));

static void
native_thread_destroy(rb_thread_t *th)
{
Expand All @@ -111,11 +105,7 @@ thread_start_func_1(void *th_ptr)
VALUE stack_start;

/* run */
thread_start_func_2(th, &stack_start
#ifdef __ia64
, rb_ia64_bsp()
#endif
);
thread_start_func_2(th, &stack_start, rb_ia64_bsp());
}
#if USE_THREAD_CACHE
if (1) {
Expand Down
5 changes: 1 addition & 4 deletions thread_win32.ci
Expand Up @@ -280,9 +280,6 @@ native_mutex_destroy(rb_thread_lock_t *lock)
}


NOINLINE(static int
thread_start_func_2(rb_thread_t *th, VALUE *stack_start));

static void
native_thread_destroy(rb_thread_t *th)
{
Expand All @@ -304,7 +301,7 @@ thread_start_func_1(void *th_ptr)
/* run */
thread_debug("thread created (th: %p, thid: %p, event: %p)\n", th,
th->thread_id, th->native_thread_data.interrupt_event);
thread_start_func_2(th, &stack_start);
thread_start_func_2(th, &stack_start, 0);

w32_close_handle(thread_id);
thread_debug("thread deleted (th: %p)\n", th);
Expand Down

0 comments on commit 0fcf8e1

Please sign in to comment.