<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ccan/list, branch v4.0.3</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Initialize loop variable of `ccan_list_for_each`</title>
<updated>2023-12-24T10:34:25+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-12-24T06:47:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=61289d940597efb76bd7bcdd0501801733d9c9dd'/>
<id>61289d940597efb76bd7bcdd0501801733d9c9dd</id>
<content type='text'>
On platforms where `typeof` is unsupported, `ccan_container_off_var`
calculates the offset of member by pointer subtraction.  Although this
will result in the compile-time invariant value regardless the pointer
value, the loop variable will be used before assignment and may cause
an using uninitialized variable warning.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On platforms where `typeof` is unsupported, `ccan_container_off_var`
calculates the offset of member by pointer subtraction.  Although this
will result in the compile-time invariant value regardless the pointer
value, the loop variable will be used before assignment and may cause
an using uninitialized variable warning.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix -Wundef warnings</title>
<updated>2022-10-26T09:57:26+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-10-26T01:53:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a14611cd54d2ac02daad5ccfe99fc3ec9b0818bd'/>
<id>a14611cd54d2ac02daad5ccfe99fc3ec9b0818bd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Prefix ccan headers (#4568)</title>
<updated>2022-03-30T07:36:31+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-03-30T07:36:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=42a0bed351979cb4a59c641fa5f03e49609561fd'/>
<id>42a0bed351979cb4a59c641fa5f03e49609561fd</id>
<content type='text'>
* Prefixed ccan headers

* Remove unprefixed names in ccan/build_assert

* Remove unprefixed names in ccan/check_type

* Remove unprefixed names in ccan/container_of

* Remove unprefixed names in ccan/list

Co-authored-by: Samuel Williams &lt;samuel.williams@oriontransfer.co.nz&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Prefixed ccan headers

* Remove unprefixed names in ccan/build_assert

* Remove unprefixed names in ccan/check_type

* Remove unprefixed names in ccan/container_of

* Remove unprefixed names in ccan/list

Co-authored-by: Samuel Williams &lt;samuel.williams@oriontransfer.co.nz&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[Doc] Fix a typo s/oher/other/</title>
<updated>2021-04-25T07:46:00+00:00</updated>
<author>
<name>wonda-tea-coffee</name>
<email>rikita.ishikawa@crowdworks.co.jp</email>
</author>
<published>2021-04-25T04:48:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ad108e63e35d571de5cdd195b4bb9b36dd4ad013'/>
<id>ad108e63e35d571de5cdd195b4bb9b36dd4ad013</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typos [ci skip]</title>
<updated>2019-10-14T08:30:04+00:00</updated>
<author>
<name>Kazuhiro NISHIYAMA</name>
<email>zn@mbf.nifty.com</email>
</author>
<published>2019-10-14T08:30:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ede1a3dc110d3cfc094ce4cd5b27f92cab8b7b6c'/>
<id>ede1a3dc110d3cfc094ce4cd5b27f92cab8b7b6c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ccan/list: sync with upstream</title>
<updated>2018-02-01T08:59:27+00:00</updated>
<author>
<name>normal</name>
<email>normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2018-02-01T08:59:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7af65953de0127d971a7dc20bea611213bd1473c'/>
<id>7af65953de0127d971a7dc20bea611213bd1473c</id>
<content type='text'>
This brings us up-to-date with ccan/list
5dbd87b876434dd703dfcc30cb0503118aac2076
git://git.ozlabs.org/~ccan/ccan

This is a combination of 3 commits from ccan:

    list: add parens to gaurd macro args in LIST_INIT
    ccan/list: Add list_empty_nocheck
    list: trivial: fix typos in list_for_each_off's documentation

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This brings us up-to-date with ccan/list
5dbd87b876434dd703dfcc30cb0503118aac2076
git://git.ozlabs.org/~ccan/ccan

This is a combination of 3 commits from ccan:

    list: add parens to gaurd macro args in LIST_INIT
    ccan/list: Add list_empty_nocheck
    list: trivial: fix typos in list_for_each_off's documentation

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>ccan/list/list.h: suppress unused argument warnings</title>
<updated>2015-09-06T07:10:54+00:00</updated>
<author>
<name>normal</name>
<email>normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-09-06T07:10:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1fab35ba1533163e6398df06b52f15a66a869fa6'/>
<id>1fab35ba1533163e6398df06b52f15a66a869fa6</id>
<content type='text'>
ccan commit 6aaca17e07588997417a73fac19dcf0ff17ed81b
("list: suppress unused argument warnings")
by Cody P Shafer.

Signed-off-by: Cody P Schafer &lt;dev@codyps.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ccan commit 6aaca17e07588997417a73fac19dcf0ff17ed81b
("list: suppress unused argument warnings")
by Cody P Shafer.

Signed-off-by: Cody P Schafer &lt;dev@codyps.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>ccan/list/list.h: sync with ccan upstream</title>
<updated>2015-04-09T00:30:26+00:00</updated>
<author>
<name>normal</name>
<email>normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-04-09T00:30:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9177eca3025ee39f0772ce61bfcabf4294411bea'/>
<id>9177eca3025ee39f0772ce61bfcabf4294411bea</id>
<content type='text'>
This includes the following 5 commits from ccan upstream:

    list: list_add_after and list_add_before functions
    list: list_swap to exchange elements
    list: new list_for_each{, _safe}_off_dir_ macros
    list: add list_for_each_rev_off macro
    list: add list_for_each_rev_safe{,_off} macros

This syncs us with commit c2fbfe5282ba264f3485586e7efa8a5967f2d386
in git://git.ozlabs.org/~ccan/ccan

These ccan commits should allow us to implement compile.c and
st.c using ccan/list to reduce duplicated linked-list logic.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This includes the following 5 commits from ccan upstream:

    list: list_add_after and list_add_before functions
    list: list_swap to exchange elements
    list: new list_for_each{, _safe}_off_dir_ macros
    list: add list_for_each_rev_off macro
    list: add list_for_each_rev_safe{,_off} macros

This syncs us with commit c2fbfe5282ba264f3485586e7efa8a5967f2d386
in git://git.ozlabs.org/~ccan/ccan

These ccan commits should allow us to implement compile.c and
st.c using ccan/list to reduce duplicated linked-list logic.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>ccan/list: new list_{del,node}_init functions</title>
<updated>2014-09-13T23:49:15+00:00</updated>
<author>
<name>normal</name>
<email>normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2014-09-13T23:49:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c975dc96b7e81d709f6ec71b539db06794a949cc'/>
<id>c975dc96b7e81d709f6ec71b539db06794a949cc</id>
<content type='text'>
* ccan/list/list.h (list_del_init, list_node_init): new functions
  for multiple list_del() calls
  [ccan ec8654d94d3c5c47aa5f82698f7e8048c79765b1] (Rusty Russell)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* ccan/list/list.h (list_del_init, list_node_init): new functions
  for multiple list_del() calls
  [ccan ec8654d94d3c5c47aa5f82698f7e8048c79765b1] (Rusty Russell)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>vm*: doubly-linked list from ccan to manage vm-&gt;living_threads</title>
<updated>2014-05-10T23:48:51+00:00</updated>
<author>
<name>normal</name>
<email>normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2014-05-10T23:48:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f11db2a605d99ef6a0943eba34db355188f8efcb'/>
<id>f11db2a605d99ef6a0943eba34db355188f8efcb</id>
<content type='text'>
A doubly-linked list for tracking living threads guarantees
constant-time insert/delete performance with no corner cases of a
hash table.  I chose this ccan implementation of doubly-linked
lists over the BSD sys/queue.h implementation since:

1) insertion and removal are both branchless
2) locality is improved if a struct may be a member of multiple lists
   (0002 patch in Feature 9632 will introduce a secondary list
   for waiting FDs)

This also increases cache locality during iteration: improving
performance in a new IO#close benchmark with many sleeping threads
while still scanning the same number of threads.

	vm_thread_close 1.762

* vm_core.h (rb_vm_t): list_head and counter for living_threads
  (rb_thread_t): vmlt_node for living_threads linkage
  (rb_vm_living_threads_init): new function wrapper
  (rb_vm_living_threads_insert): ditto
  (rb_vm_living_threads_remove): ditto
* vm.c (rb_vm_living_threads_foreach): new function wrapper
* thread.c (terminate_i, thread_start_func_2, thread_create_core,
  thread_fd_close_i, thread_fd_close): update to use new APIs
* vm.c (vm_mark_each_thread_func, rb_vm_mark, ruby_vm_destruct,
  vm_memsize, vm_init2, Init_VM): ditto
* vm_trace.c (clear_trace_func_i, rb_clear_trace_func): ditto
* benchmark/bm_vm_thread_close.rb: added to show improvement
* ccan/build_assert/build_assert.h: added as a dependency of list.h
* ccan/check_type/check_type.h: ditto
* ccan/container_of/container_of.h: ditto
* ccan/licenses/BSD-MIT: ditto
* ccan/licenses/CC0: ditto
* ccan/str/str.h: ditto (stripped of unused macros)
* ccan/list/list.h: ditto
* common.mk: add CCAN_LIST_INCLUDES
  [ruby-core:61871][Feature 9632 (part 1)]

Apologies for the size of this commit, but I think a good
doubly-linked list will be useful for future features, too.
This may be used to add ordering to a container_of-based hash
table to preserve compatibility if required (e.g. feature 9614).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A doubly-linked list for tracking living threads guarantees
constant-time insert/delete performance with no corner cases of a
hash table.  I chose this ccan implementation of doubly-linked
lists over the BSD sys/queue.h implementation since:

1) insertion and removal are both branchless
2) locality is improved if a struct may be a member of multiple lists
   (0002 patch in Feature 9632 will introduce a secondary list
   for waiting FDs)

This also increases cache locality during iteration: improving
performance in a new IO#close benchmark with many sleeping threads
while still scanning the same number of threads.

	vm_thread_close 1.762

* vm_core.h (rb_vm_t): list_head and counter for living_threads
  (rb_thread_t): vmlt_node for living_threads linkage
  (rb_vm_living_threads_init): new function wrapper
  (rb_vm_living_threads_insert): ditto
  (rb_vm_living_threads_remove): ditto
* vm.c (rb_vm_living_threads_foreach): new function wrapper
* thread.c (terminate_i, thread_start_func_2, thread_create_core,
  thread_fd_close_i, thread_fd_close): update to use new APIs
* vm.c (vm_mark_each_thread_func, rb_vm_mark, ruby_vm_destruct,
  vm_memsize, vm_init2, Init_VM): ditto
* vm_trace.c (clear_trace_func_i, rb_clear_trace_func): ditto
* benchmark/bm_vm_thread_close.rb: added to show improvement
* ccan/build_assert/build_assert.h: added as a dependency of list.h
* ccan/check_type/check_type.h: ditto
* ccan/container_of/container_of.h: ditto
* ccan/licenses/BSD-MIT: ditto
* ccan/licenses/CC0: ditto
* ccan/str/str.h: ditto (stripped of unused macros)
* ccan/list/list.h: ditto
* common.mk: add CCAN_LIST_INCLUDES
  [ruby-core:61871][Feature 9632 (part 1)]

Apologies for the size of this commit, but I think a good
doubly-linked list will be useful for future features, too.
This may be used to add ordering to a container_of-based hash
table to preserve compatibility if required (e.g. feature 9614).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
</feed>
