Skip to content

Commit 757ed3c

Browse files
committed
* ruby.h: define RUBY_VM macro and remove NATIVETHREAD* macros.
* intern.h: ditto. * signal.c (posix_signal): remove unused function posix_nativethread_signal(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 571317e commit 757ed3c

File tree

4 files changed

+11
-38
lines changed

4 files changed

+11
-38
lines changed

ChangeLog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
Sun Feb 25 11:38:40 2007 Koichi Sasada <ko1@atdot.net>
2+
3+
* ruby.h: define RUBY_VM macro and remove NATIVETHREAD* macros.
4+
5+
* intern.h: ditto.
6+
7+
* signal.c (posix_signal): remove unused function
8+
posix_nativethread_signal().
9+
110
Sun Feb 25 11:31:13 2007 Koichi Sasada <ko1@atdot.net>
211

312
* thread.c (rb_thread_run): fix to ANSI style.

intern.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -469,10 +469,6 @@ void rb_gc_mark_trap_list(void);
469469
#ifdef POSIX_SIGNAL
470470
#define posix_signal ruby_posix_signal
471471
void posix_signal(int, RETSIGTYPE (*)(int));
472-
#ifdef HAVE_NATIVETHREAD
473-
#define posix_nativethread_signal ruby_posix_nativethread_signal
474-
void posix_nativethread_signal(int, RETSIGTYPE (*)(int));
475-
#endif
476472
#endif
477473
void rb_trap_exit(void);
478474
void rb_trap_exec(void);

ruby.h

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -812,23 +812,8 @@ rb_special_const_p(VALUE obj)
812812
static char *dln_libs_to_be_linked[] = { EXTLIB, 0 };
813813
#endif
814814

815-
#if defined(HAVE_LIBPTHREAD)
816-
#ifdef HAVE_PTHREAD_H
817-
#include <pthread.h>
818-
#endif
819-
typedef pthread_t rb_nativethread_t;
820-
# define NATIVETHREAD_CURRENT() pthread_self()
821-
# define NATIVETHREAD_EQUAL(t1,t2) pthread_equal((t1),(t2))
822-
# define HAVE_NATIVETHREAD
823-
824-
# define NATIVETHREAD_KILL(th,sig) pthread_kill((th),(sig))
825-
# define HAVE_NATIVETHREAD_KILL
826-
#elif defined(_WIN32) || defined(_WIN32_WCE)
827-
typedef DWORD rb_nativethread_t;
828-
# define NATIVETHREAD_CURRENT() GetCurrentThreadId()
829-
# define NATIVETHREAD_EQUAL(t1,t2) ((t1) == (t2))
830-
# define HAVE_NATIVETHREAD
831-
#endif
815+
#define RUBY_VM 1 /* YARV */
816+
#define HAVE_NATIVETHREAD
832817

833818
#if defined(__cplusplus)
834819
#if 0

signal.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -354,23 +354,6 @@ posix_signal(int signum, sighandler_t handler)
354354
ruby_signal(signum, handler);
355355
}
356356

357-
#ifdef HAVE_NATIVETHREAD
358-
static sighandler_t
359-
ruby_nativethread_signal(int signum, sighandler_t handler)
360-
{
361-
sighandler_t old;
362-
363-
old = ruby_signal(signum, handler);
364-
rb_trap_accept_nativethreads[signum] = 1;
365-
return old;
366-
}
367-
368-
void
369-
posix_nativethread_signal(int signum, sighandler_t handler)
370-
{
371-
ruby_nativethread_signal(signum, handler);
372-
}
373-
#endif
374357
#else /* !POSIX_SIGNAL */
375358
#define ruby_signal(sig,handler) (rb_trap_accept_nativethreads[sig] = 0, signal((sig),(handler)))
376359
#ifdef HAVE_NATIVETHREAD

0 commit comments

Comments
 (0)