Feature #20750 » 11649b-additional-changes.patch
ext/fiddle/closure.c | ||
---|---|---|
x.args = args;
|
||
x.ctx = ctx;
|
||
if (ruby_thread_has_gvl_p()) {
|
||
(void)with_gvl_callback(&x);
|
||
} else {
|
||
(void)rb_thread_call_with_gvl(with_gvl_callback, &x);
|
||
}
|
||
}
|
||
static VALUE
|
gc.c | ||
---|---|---|
exc, fmt, &ap,
|
||
};
|
||
if (ruby_thread_has_gvl_p()) {
|
||
gc_vraise(&argv);
|
||
UNREACHABLE;
|
||
}
|
||
else if (ruby_native_thread_p()) {
|
||
if (ruby_native_thread_p()) {
|
||
rb_thread_call_with_gvl(gc_vraise, &argv);
|
||
UNREACHABLE;
|
||
}
|
||
... | ... | |
if (ruby_thread_has_gvl_p()) {
|
||
rb_memerror();
|
||
}
|
||
else if (ruby_native_thread_p()) {
|
||
rb_thread_call_with_gvl(ruby_memerror_body, 0);
|
||
}
|
||
else {
|
||
if (ruby_native_thread_p()) {
|
||
rb_thread_call_with_gvl(ruby_memerror_body, 0);
|
||
}
|
||
else {
|
||
/* no ruby thread */
|
||
fprintf(stderr, "[FATAL] failed to allocate memory\n");
|
||
}
|
||
/* no ruby thread */
|
||
fprintf(stderr, "[FATAL] failed to allocate memory\n");
|
||
}
|
||
exit(EXIT_FAILURE);
|
||
}
|
gc/default.c | ||
---|---|---|
if (ruby_thread_has_gvl_p()) {
|
||
return garbage_collect(objspace, reason);
|
||
}
|
||
else if(ruby_native_thread_p()) {
|
||
struct objspace_and_reason oar;
|
||
oar.objspace = objspace;
|
||
oar.reason = reason;
|
||
return (int)(VALUE)rb_thread_call_with_gvl(gc_with_gvl, (void *)&oar);
|
||
}
|
||
else {
|
||
if (ruby_native_thread_p()) {
|
||
struct objspace_and_reason oar;
|
||
oar.objspace = objspace;
|
||
oar.reason = reason;
|
||
return (int)(VALUE)rb_thread_call_with_gvl(gc_with_gvl, (void *)&oar);
|
||
}
|
||
else {
|
||
/* no ruby thread */
|
||
fprintf(stderr, "[FATAL] failed to allocate memory\n");
|
||
exit(EXIT_FAILURE);
|
||
}
|
||
/* no ruby thread */
|
||
fprintf(stderr, "[FATAL] failed to allocate memory\n");
|
||
exit(EXIT_FAILURE);
|
||
}
|
||
}
|
||
- « Previous
- 1
- 2
- 3
- Next »