[前][次][番号順一覧][スレッド一覧]

ruby-changes:46733

From: normal <ko1@a...>
Date: Tue, 23 May 2017 08:41:57 +0900 (JST)
Subject: [ruby-changes:46733] normal:r58848 (trunk): variable.c (autoload_sleep_done): avoid needless list_node init

normal	2017-05-23 08:41:50 +0900 (Tue, 23 May 2017)

  New Revision: 58848

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58848

  Log:
    variable.c (autoload_sleep_done): avoid needless list_node init
    
    We do not need list_del_init in ensure callbacks, only list_del,
    since it can only ever be called after list_del_init in
    autoload_reset.  So avoid the needless re-initialization.
    
    * variable.c (autoload_sleep_done): s/list_del_init/list_del/

  Modified files:
    trunk/variable.c
Index: variable.c
===================================================================
--- variable.c	(revision 58847)
+++ variable.c	(revision 58848)
@@ -2141,7 +2141,7 @@ autoload_sleep_done(VALUE arg) https://github.com/ruby/ruby/blob/trunk/variable.c#L2141
     struct autoload_state *state = (struct autoload_state *)arg;
 
     if (state->thread != Qfalse && rb_thread_to_be_killed(state->thread)) {
-	list_del_init(&state->waitq.node); /* idempotent */
+	list_del(&state->waitq.node); /* idempotent after list_del_init */
     }
 
     return Qfalse;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]