Project

General

Profile

Actions

Feature #2294

open

[PATCH] ruby_bind_stack() to embed Ruby in coroutine

Added by sunaku (Suraj Kurapati) about 15 years ago. Updated almost 7 years ago.

Status:
Assigned
Target version:
-
[ruby-core:26361]

Description

=begin
Hi,

I am attaching a "ruby_bind_stack.patch" patch file
that adds a ruby_bind_stack() function to the Ruby C API.

This function allows me to inform the GC about the stack
boundaries of the coroutine inside which Ruby is embedded:

void ruby_bind_stack(void *lower, void *upper);

I am also attaching tarballs containing code examples that
embed Ruby inside two different coroutine environments:
UNIX System V contexts1 and libpcl2 coroutines.

Each tarball has an "output.log" file which contains the
result of running script -c ./run.sh output.log on my
machine:

Linux yantram 2.6.31-ARCH #1 SMP PREEMPT Tue Oct 13 13:36:23 CEST 2009 i686 Intel(R) Pentium(R) D CPU 3.00GHz GenuineIntel GNU/Linux

The last section in "output.log" corresponds to Ruby @ SVN
trunk that is patched with the "ruby_bind_stack.patch"
patch file that is attached to this issue.

Thanks for your consideration.

See also:


Files

ruby_bind_stack.patch (2.66 KB) ruby_bind_stack.patch sunaku (Suraj Kurapati), 10/28/2009 02:02 AM
ruby-ucontext-static-stack.tgz (10 KB) ruby-ucontext-static-stack.tgz sunaku (Suraj Kurapati), 10/28/2009 02:02 AM
ruby-ucontext-dynamic-stack.tgz (10.2 KB) ruby-ucontext-dynamic-stack.tgz sunaku (Suraj Kurapati), 10/28/2009 02:02 AM
ruby-libpcl-static-stack.tgz (10.3 KB) ruby-libpcl-static-stack.tgz sunaku (Suraj Kurapati), 10/28/2009 02:02 AM
ruby-libpcl-dynamic-stack.tgz (10 KB) ruby-libpcl-dynamic-stack.tgz sunaku (Suraj Kurapati), 10/28/2009 02:02 AM
ruby_bind_stack.patch (2.67 KB) ruby_bind_stack.patch better description in changelog sunaku (Suraj Kurapati), 10/28/2009 02:33 AM
ruby_bind_stack.patch (5 KB) ruby_bind_stack.patch added multi-thread support sunaku (Suraj Kurapati), 10/28/2009 01:22 PM
ruby-ucontext-thread.tgz (54.2 KB) ruby-ucontext-thread.tgz sunaku (Suraj Kurapati), 10/28/2009 03:02 PM
ruby-libpcl-thread.tgz (53.3 KB) ruby-libpcl-thread.tgz sunaku (Suraj Kurapati), 10/28/2009 03:02 PM
ruby_bind_stack.patch (4.98 KB) ruby_bind_stack.patch better description in changelog sunaku (Suraj Kurapati), 10/28/2009 10:51 PM
ruby_bind_stack.patch (5.47 KB) ruby_bind_stack.patch add API docs; add upper > lower assert sunaku (Suraj Kurapati), 10/30/2009 05:13 AM
ruby_bind_stack.patch (5.45 KB) ruby_bind_stack.patch better & shorter API docs sunaku (Suraj Kurapati), 10/30/2009 05:37 AM
ruby_bind_stack.patch (5.46 KB) ruby_bind_stack.patch even better API docs sunaku (Suraj Kurapati), 10/30/2009 05:39 AM
ruby_bind_stack.patch (5.4 KB) ruby_bind_stack.patch update API docs - remove confusing note about stack top & bottom sunaku (Suraj Kurapati), 10/30/2009 03:55 PM
ruby_bind_stack_after_refactoring.patch (3.06 KB) ruby_bind_stack_after_refactoring.patch sunaku (Suraj Kurapati), 10/31/2009 02:25 PM
ruby_bind_stack.patch (5.72 KB) ruby_bind_stack.patch better API docs sunaku (Suraj Kurapati), 11/01/2009 03:32 AM
ruby_bind_stack_after_refactoring.patch (3.37 KB) ruby_bind_stack_after_refactoring.patch better API docs sunaku (Suraj Kurapati), 11/01/2009 03:32 AM
ruby_bind_stack.patch (5.76 KB) ruby_bind_stack.patch reduce runtime overhead sunaku (Suraj Kurapati), 11/01/2009 04:12 AM
ruby_bind_stack_after_refactoring.patch (3.42 KB) ruby_bind_stack_after_refactoring.patch reduce runtime overhead sunaku (Suraj Kurapati), 11/01/2009 04:12 AM
ruby_bind_stack_r25604.patch (3.78 KB) ruby_bind_stack_r25604.patch patch against SVN trunk r25604 sunaku (Suraj Kurapati), 11/04/2009 02:28 AM
example-pthread-static.tgz (55 KB) example-pthread-static.tgz sunaku (Suraj Kurapati), 11/19/2009 05:05 PM
example-pthread-static.tgz (55 KB) example-pthread-static.tgz sunaku (Suraj Kurapati), 11/19/2009 05:05 PM
example-pthread-malloc.tgz (55.5 KB) example-pthread-malloc.tgz sunaku (Suraj Kurapati), 11/20/2009 03:46 AM
ruby_bind_stack_r28007.patch (3.78 KB) ruby_bind_stack_r28007.patch Patch against SVN r28007 sunaku (Suraj Kurapati), 05/26/2010 04:31 AM
ruby_bind_stack_r28972.patch (3.78 KB) ruby_bind_stack_r28972.patch sunaku (Suraj Kurapati), 08/14/2010 10:40 AM
ruby_bind_stack_1.9.2p0.patch (3.78 KB) ruby_bind_stack_1.9.2p0.patch sunaku (Suraj Kurapati), 08/22/2010 03:26 AM

Related issues 2 (0 open2 closed)

Is duplicate of Ruby master - Feature #2126: ruby_init_stack() - add ability to specify or query max_stack_sizeClosed09/20/2009Actions
Is duplicate of Ruby master - Bug #2258: Kernel#require inside rb_require() inside rb_protect() inside SysV context failsClosed10/23/2009Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0