зеркало из https://github.com/github/ruby.git
* thread_pthread.c (mutex_debug): use exit(EXIT_FAILURE) instad of
exit(1). * thread_pthread.c (add_signal_thread_list): ditto. * thread.c (rb_thread_call_with_gvl): ditto. * util.c (Bug): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
a2e497d5ed
Коммит
b9a13f4962
|
@ -1,3 +1,11 @@
|
|||
Sun Jul 10 17:28:01 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* thread_pthread.c (mutex_debug): use exit(EXIT_FAILURE) instad of
|
||||
exit(1).
|
||||
* thread_pthread.c (add_signal_thread_list): ditto.
|
||||
* thread.c (rb_thread_call_with_gvl): ditto.
|
||||
* util.c (Bug): ditto.
|
||||
|
||||
Sun Jul 10 15:58:12 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* ext/json: Merge json gem 1.5.4+ (f7f78896607b6f6226cd).
|
||||
|
|
2
thread.c
2
thread.c
|
@ -1210,7 +1210,7 @@ rb_thread_call_with_gvl(void *(*func)(void *), void *data1)
|
|||
*/
|
||||
|
||||
fprintf(stderr, "[BUG] rb_thread_call_with_gvl() is called by non-ruby thread\n");
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
brb = (struct rb_blocking_region_buffer *)th->blocking_region_buffer;
|
||||
|
|
|
@ -170,9 +170,9 @@ mutex_debug(const char *msg, pthread_mutex_t *lock)
|
|||
int r;
|
||||
static pthread_mutex_t dbglock = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
if ((r = pthread_mutex_lock(&dbglock)) != 0) {exit(1);}
|
||||
if ((r = pthread_mutex_lock(&dbglock)) != 0) {exit(EXIT_FAILURE);}
|
||||
fprintf(stdout, "%s: %p\n", msg, (void *)lock);
|
||||
if ((r = pthread_mutex_unlock(&dbglock)) != 0) {exit(1);}
|
||||
if ((r = pthread_mutex_unlock(&dbglock)) != 0) {exit(EXIT_FAILURE);}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -946,7 +946,7 @@ add_signal_thread_list(rb_thread_t *th)
|
|||
|
||||
if (list == 0) {
|
||||
fprintf(stderr, "[FATAL] failed to allocate memory\n");
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
list->th = th;
|
||||
|
|
2
util.c
2
util.c
|
@ -837,7 +837,7 @@ ruby_getcwd(void)
|
|||
|
||||
#ifdef DEBUG
|
||||
#include "stdio.h"
|
||||
#define Bug(x) {fprintf(stderr, "%s\n", (x)); exit(1);}
|
||||
#define Bug(x) {fprintf(stderr, "%s\n", (x)); exit(EXIT_FAILURE);}
|
||||
#endif
|
||||
|
||||
#include "stdlib.h"
|
||||
|
|
Загрузка…
Ссылка в новой задаче