Commit 14fc9cd 1 parent f3b61c1 commit 14fc9cd Copy full SHA for 14fc9cd
File tree 2 files changed +15
-6
lines changed
2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 4
4
Let thread-terminate! sends the signal again if thread is too busy
5
5
to call Scm_SigCheck(), which makes the thread exit.
6
6
https://github.com/shirok/Gauche/issues/1106
7
+ * src/gauche/pthread.h (GAUCHE_PTHREAD_SIGNAL): Use SIGUSR1 for
8
+ thread termination singal on OSX, for it does not have real-time
9
+ signals. (OSX does no use signals but use thread_suspend /
10
+ thread_resume in GC.)
7
11
* src/libextra.scm, test/thread-termination.scm: Add procedures
8
12
specifically made to test thread-termination-by-signal behavior.
9
13
Original file line number Diff line number Diff line change @@ -78,13 +78,18 @@ typedef pthread_t ScmInternalThread;
78
78
provide them (on cygwin, SIGRTMIN == SIGRTMAX). We use SIGPWR
79
79
instead.
80
80
*/
81
- #if defined(SIGRTMIN ) && !defined(GAUCHE_PTHREAD_SIGNAL )
82
- # if !defined(__CYGWIN__ )
83
- # define GAUCHE_PTHREAD_SIGNAL (SIGRTMIN+5)
84
- # else
85
- # define GAUCHE_PTHREAD_SIGNAL SIGPWR
81
+ #if !defined(GAUCHE_PTHREAD_SIGNAL )
82
+ # if defined(SIGRTMIN )
83
+ # if !defined(__CYGWIN__ )
84
+ # define GAUCHE_PTHREAD_SIGNAL (SIGRTMIN+5)
85
+ # else
86
+ # define GAUCHE_PTHREAD_SIGNAL SIGPWR
87
+ # endif
88
+ # elif defined(__APPLE__ )
89
+ # define GAUCHE_PTHREAD_SIGNAL SIGUSR1
86
90
# endif
87
- #endif /*defined(SIGRTMIN) && !defined(GAUCHE_PTHREAD_SIGNAL)*/
91
+ #endif /*!defined(GAUCHE_PTHREAD_SIGNAL)*/
92
+
88
93
89
94
/* ScmInternalMutex - a mutex structure.
90
95
You can’t perform that action at this time.
0 commit comments