<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/thread_none.c, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[wasm] Scan machine stack based on `ec-&gt;machine.stack_{start,end}`</title>
<updated>2022-11-05T20:03:21+00:00</updated>
<author>
<name>Yuta Saito</name>
<email>kateinoigakukun@gmail.com</email>
</author>
<published>2022-11-05T16:10:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3a6cdeda89280ade714f158830acee88fb36306d'/>
<id>3a6cdeda89280ade714f158830acee88fb36306d</id>
<content type='text'>
fiber machine stack is placed outside of C stack allocated by wasm-ld,
so highest stack address recorded by `rb_wasm_record_stack_base` is
invalid when running on non-main fiber.
Therefore, we should scan `stack_{start,end}` which always point a valid
stack range in any context.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fiber machine stack is placed outside of C stack allocated by wasm-ld,
so highest stack address recorded by `rb_wasm_record_stack_base` is
invalid when running on non-main fiber.
Therefore, we should scan `stack_{start,end}` which always point a valid
stack range in any context.
</pre>
</div>
</content>
</entry>
<entry>
<title>GVL Instrumentation: remove the EXITED count assertion</title>
<updated>2022-07-13T17:39:31+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2022-07-13T16:49:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=664c23db79dd0d500a834ef0ec8da443d95ddfd6'/>
<id>664c23db79dd0d500a834ef0ec8da443d95ddfd6</id>
<content type='text'>
It's very flaky for some unknown reason. Something we have
an extra EXITED event. I suspect some other test is causing this.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's very flaky for some unknown reason. Something we have
an extra EXITED event. I suspect some other test is causing this.
</pre>
</div>
</content>
</entry>
<entry>
<title>GVL Instrumentation API: add STARTED and EXITED events</title>
<updated>2022-06-17T07:08:26+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2022-06-15T12:37:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b6c1e1158d71b533b255ae7a2731598455918071'/>
<id>b6c1e1158d71b533b255ae7a2731598455918071</id>
<content type='text'>
[Feature #18339]

After experimenting with the initial version of the API I figured there is a need
for an exit event to cleanup instrumentation data. e.g. if you record data in a
{thread_id -&gt; data} table, you need to free associated data when a thread goes away.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Feature #18339]

After experimenting with the initial version of the API I figured there is a need
for an exit event to cleanup instrumentation data. e.g. if you record data in a
{thread_id -&gt; data} table, you need to free associated data when a thread goes away.
</pre>
</div>
</content>
</entry>
<entry>
<title>remove `DEBUG_OUT()` macro</title>
<updated>2022-05-24T07:28:07+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2022-05-24T06:06:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=62e08d4b844a3f4f7a6dadc6083cd0585485931b'/>
<id>62e08d4b844a3f4f7a6dadc6083cd0585485931b</id>
<content type='text'>
This macro is no longer used ([GH-5933]).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This macro is no longer used ([GH-5933]).
</pre>
</div>
</content>
</entry>
<entry>
<title>remove `NON_SCALAR_THREAD_ID` support</title>
<updated>2022-05-24T01:06:51+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2022-05-23T17:56:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d9984f39d32f4cd692a35f4d803f7754ea262805'/>
<id>d9984f39d32f4cd692a35f4d803f7754ea262805</id>
<content type='text'>
`NON_SCALAR_THREAD_ID` shows `pthread_t` is non-scalar (non-pointer)
and only s390x is known platform. However, the supporting code is
very complex and it is only used for deubg print information.

So this patch removes the support of `NON_SCALAR_THREAD_ID`
and make the code simple.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`NON_SCALAR_THREAD_ID` shows `pthread_t` is non-scalar (non-pointer)
and only s390x is known platform. However, the supporting code is
very complex and it is only used for deubg print information.

So this patch removes the support of `NON_SCALAR_THREAD_ID`
and make the code simple.
</pre>
</div>
</content>
</entry>
<entry>
<title>introduce struct `rb_native_thread`</title>
<updated>2022-04-22T18:08:27+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2022-04-22T12:19:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=03d21a4fb099da7c52e6591e17704c297871b7db'/>
<id>03d21a4fb099da7c52e6591e17704c297871b7db</id>
<content type='text'>
`rb_thread_t` contained `native_thread_data_t` to represent
thread implementation dependent data. This patch separates
them and rename it `rb_native_thread` and point it from
`rb_thraed_t`.

Now, 1 Ruby thread (`rb_thread_t`) has 1 native thread (`rb_native_thread`).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`rb_thread_t` contained `native_thread_data_t` to represent
thread implementation dependent data. This patch separates
them and rename it `rb_native_thread` and point it from
`rb_thraed_t`.

Now, 1 Ruby thread (`rb_thread_t`) has 1 native thread (`rb_native_thread`).
</pre>
</div>
</content>
</entry>
<entry>
<title>rename thread internal naming</title>
<updated>2022-04-21T22:54:09+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2022-04-16T18:40:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1c4fc0241d125879e1e5169f267f26637772f3a7'/>
<id>1c4fc0241d125879e1e5169f267f26637772f3a7</id>
<content type='text'>
Now GVL is not process *Global* so this patch try to use
another words.

* `rb_global_vm_lock_t` -&gt; `struct rb_thread_sched`
  * `gvl-&gt;owner` -&gt; `sched-&gt;running`
  * `gvl-&gt;waitq` -&gt; `sched-&gt;readyq`
* `rb_gvl_init` -&gt; `rb_thread_sched_init`
* `gvl_destroy` -&gt; `rb_thread_sched_destroy`
* `gvl_acquire` -&gt; `thread_sched_to_running` # waiting -&gt; ready -&gt; running
* `gvl_release` -&gt; `thread_sched_to_waiting` # running -&gt; waiting
* `gvl_yield`   -&gt; `thread_sched_yield`
* `GVL_UNLOCK_BEGIN` -&gt; `THREAD_BLOCKING_BEGIN`
* `GVL_UNLOCK_END` -&gt; `THREAD_BLOCKING_END`

* removed
  * `rb_ractor_gvl`
  * `rb_vm_gvl_destroy` (not used)

There are GVL functions such as `rb_thread_call_without_gvl()` yet
but I don't have good name to replace them. Maybe GVL stands for
"Greate Valuable Lock" or something like that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now GVL is not process *Global* so this patch try to use
another words.

* `rb_global_vm_lock_t` -&gt; `struct rb_thread_sched`
  * `gvl-&gt;owner` -&gt; `sched-&gt;running`
  * `gvl-&gt;waitq` -&gt; `sched-&gt;readyq`
* `rb_gvl_init` -&gt; `rb_thread_sched_init`
* `gvl_destroy` -&gt; `rb_thread_sched_destroy`
* `gvl_acquire` -&gt; `thread_sched_to_running` # waiting -&gt; ready -&gt; running
* `gvl_release` -&gt; `thread_sched_to_waiting` # running -&gt; waiting
* `gvl_yield`   -&gt; `thread_sched_yield`
* `GVL_UNLOCK_BEGIN` -&gt; `THREAD_BLOCKING_BEGIN`
* `GVL_UNLOCK_END` -&gt; `THREAD_BLOCKING_END`

* removed
  * `rb_ractor_gvl`
  * `rb_vm_gvl_destroy` (not used)

There are GVL functions such as `rb_thread_call_without_gvl()` yet
but I don't have good name to replace them. Maybe GVL stands for
"Greate Valuable Lock" or something like that.
</pre>
</div>
</content>
</entry>
<entry>
<title>[wasm] add no thread variant for freestanding environment</title>
<updated>2022-01-19T02:19:06+00:00</updated>
<author>
<name>Yuta Saito</name>
<email>kateinoigakukun@gmail.com</email>
</author>
<published>2022-01-15T15:37:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=420622b5a793186dfa533e7702913fd5e4764e0f'/>
<id>420622b5a793186dfa533e7702913fd5e4764e0f</id>
<content type='text'>
This implementation does nothing around preemptive context switching
because there is no native thread.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This implementation does nothing around preemptive context switching
because there is no native thread.
</pre>
</div>
</content>
</entry>
</feed>
