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

ruby-changes:54158

From: normal <ko1@a...>
Date: Thu, 13 Dec 2018 17:44:21 +0900 (JST)
Subject: [ruby-changes:54158] normal:r66379 (trunk): thread_pthread.c (gvl_release_common): constify return value

normal	2018-12-13 17:44:15 +0900 (Thu, 13 Dec 2018)

  New Revision: 66379

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

  Log:
    thread_pthread.c (gvl_release_common): constify return value
    
    No need for it to be mutable

  Modified files:
    trunk/thread_pthread.c
Index: thread_pthread.c
===================================================================
--- thread_pthread.c	(revision 66378)
+++ thread_pthread.c	(revision 66379)
@@ -270,7 +270,7 @@ gvl_acquire(rb_vm_t *vm, rb_thread_t *th https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L270
     rb_native_mutex_unlock(&vm->gvl.lock);
 }
 
-static native_thread_data_t *
+static const native_thread_data_t *
 gvl_release_common(rb_vm_t *vm)
 {
     native_thread_data_t *next;
@@ -292,7 +292,7 @@ gvl_release(rb_vm_t *vm) https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L292
 static void
 gvl_yield(rb_vm_t *vm, rb_thread_t *th)
 {
-    native_thread_data_t *next;
+    const native_thread_data_t *next;
 
     /*
      * Perhaps other threads are stuck in blocking region w/o GVL, too,

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

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