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

ruby-changes:50362

From: normal <ko1@a...>
Date: Mon, 19 Feb 2018 09:30:46 +0900 (JST)
Subject: [ruby-changes:50362] normal:r62478 (trunk): thread_pthread.c (native_thread_create): remove needless attrp

normal	2018-02-19 09:30:43 +0900 (Mon, 19 Feb 2018)

  New Revision: 62478

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

  Log:
    thread_pthread.c (native_thread_create): remove needless attrp
    
    Followup-to: r61719 (commit e8f40bd8f83e1b22ef9c22f0e5d7a1fc0b07f94c)
      ("thread_pthread: remove HAVE_PTHREAD_ATTR_INIT ifdefs")
      [ruby-core:84758] [Misc #14342]

  Modified files:
    trunk/thread_pthread.c
Index: thread_pthread.c
===================================================================
--- thread_pthread.c	(revision 62477)
+++ thread_pthread.c	(revision 62478)
@@ -957,7 +957,6 @@ native_thread_create(rb_thread_t *th) https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L957
     }
     else {
 	pthread_attr_t attr;
-	pthread_attr_t *const attrp = &attr;
 	const size_t stack_size = th->vm->default_params.thread_machine_stack_size;
 	const size_t space = space_size(stack_size);
 
@@ -979,7 +978,7 @@ native_thread_create(rb_thread_t *th) https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L978
 # endif
 	CHECK_ERR(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED));
 
-	err = pthread_create(&th->thread_id, attrp, thread_start_func_1, th);
+	err = pthread_create(&th->thread_id, &attr, thread_start_func_1, th);
 	thread_debug("create: %p (%d)\n", (void *)th, err);
 	/* should be done in the created thread */
 	fill_thread_id_str(th);

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

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