зеркало из https://github.com/github/ruby.git
* cont.c: Typo in constant MAX_MACHINE_STACK_CACHE from '..MAHINE..'
patch by @schmurfy [Fixes GH-307] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
53fa01d060
Коммит
24acab6543
|
@ -1,3 +1,8 @@
|
||||||
|
Fri May 17 21:47:00 2013 Zachary Scott <zachary@zacharyscott.net>
|
||||||
|
|
||||||
|
* cont.c: Typo in constant MAX_MACHINE_STACK_CACHE from '..MAHINE..'
|
||||||
|
patch by @schmurfy [Fixes GH-307]
|
||||||
|
|
||||||
Fri May 17 19:18:24 2013 Akinori MUSHA <knu@iDaemons.org>
|
Fri May 17 19:18:24 2013 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
* misc/ruby-electric.el (ruby-electric-matching-char): Do not put
|
* misc/ruby-electric.el (ruby-electric-matching-char): Do not put
|
||||||
|
|
6
cont.c
6
cont.c
|
@ -86,13 +86,13 @@ enum fiber_status {
|
||||||
};
|
};
|
||||||
|
|
||||||
#if FIBER_USE_NATIVE && !defined(_WIN32)
|
#if FIBER_USE_NATIVE && !defined(_WIN32)
|
||||||
#define MAX_MAHINE_STACK_CACHE 10
|
#define MAX_MACHINE_STACK_CACHE 10
|
||||||
static int machine_stack_cache_index = 0;
|
static int machine_stack_cache_index = 0;
|
||||||
typedef struct machine_stack_cache_struct {
|
typedef struct machine_stack_cache_struct {
|
||||||
void *ptr;
|
void *ptr;
|
||||||
size_t size;
|
size_t size;
|
||||||
} machine_stack_cache_t;
|
} machine_stack_cache_t;
|
||||||
static machine_stack_cache_t machine_stack_cache[MAX_MAHINE_STACK_CACHE];
|
static machine_stack_cache_t machine_stack_cache[MAX_MACHINE_STACK_CACHE];
|
||||||
static machine_stack_cache_t terminated_machine_stack;
|
static machine_stack_cache_t terminated_machine_stack;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1233,7 +1233,7 @@ fiber_store(rb_fiber_t *next_fib)
|
||||||
fiber_setcontext(next_fib, fib);
|
fiber_setcontext(next_fib, fib);
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
if (terminated_machine_stack.ptr) {
|
if (terminated_machine_stack.ptr) {
|
||||||
if (machine_stack_cache_index < MAX_MAHINE_STACK_CACHE) {
|
if (machine_stack_cache_index < MAX_MACHINE_STACK_CACHE) {
|
||||||
machine_stack_cache[machine_stack_cache_index].ptr = terminated_machine_stack.ptr;
|
machine_stack_cache[machine_stack_cache_index].ptr = terminated_machine_stack.ptr;
|
||||||
machine_stack_cache[machine_stack_cache_index].size = terminated_machine_stack.size;
|
machine_stack_cache[machine_stack_cache_index].size = terminated_machine_stack.size;
|
||||||
machine_stack_cache_index++;
|
machine_stack_cache_index++;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче