[#62904] [ruby-trunk - Feature #9894] [Open] [RFC] README.EXT: document rb_gc_register_mark_object — normalperson@...
Issue #9894 has been reported by Eric Wong.
3 messages
2014/06/02
[#63321] [ANN] ElixirConf 2014 - Don't Miss Jos辿 Valim and Dave Thomas — Jim Freeze <jimfreeze@...>
Just a few more weeks until ElixirConf 2014!
6 messages
2014/06/24
[ruby-core:63118] [ruby-trunk - Bug #9884] thread_pthread.c assumes pthread_t is a scalar type
From:
kosaki.motohiro@...
Date:
2014-06-12 02:39:58 UTC
List:
ruby-core #63118
Issue #9884 has been updated by Motohiro KOSAKI.
On Wed, Jun 11, 2014 at 9:33 PM, <Rei.Odaira@gmail.com> wrote:
> Issue #9884 has been updated by Rei Odaira.
>
>
> I was looking at this page:
> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html
>
> ~~~
> IEEE Std 1003.1-2001/Cor 2-2004, item XBD/TC2/D6/26 is applied, adding pthread_t to the list of types that are not required to be arithmetic types, thus allowing pthread_t to be defined as a structure.
> ~~~
Ah, OK. Got it. Thanks.
----------------------------------------
Bug #9884: thread_pthread.c assumes pthread_t is a scalar type
https://bugs.ruby-lang.org/issues/9884#change-47180
* Author: Rei Odaira
* Status: Closed
* Priority: Normal
* Assignee:
* Category:
* Target version:
* ruby -v: ruby 2.2.0dev (2014-05-30 trunk 46238) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
Many code lines in `thread_pthread.c` assume `pthread_t` is a scalar type. For example,
~~~
thread_debug("ubf_select_each (%p)\n", (void *)th->thread_id);
~~~
and
~~~
if (!timer_thread_id) {
~~~
I don't think the standard guarantees `pthread_t` is a scalar type. z/OS defines `pthread_t` as a struct, and there seem to be other such environments.
https://sourceware.org/pthreads-win32/faq.html
I understand it could be too cumbersome to rewrite the source, assuming `pthread_t` might not be a scalar, and actually I am not sure what would be the best way to rewrite it, but I appreciate it if you guys could think of it for the maximum portability. If needed, I am willing to list the source lines to be rewritten.
---Files--------------------------------
opaque_thread_id.patch (7.63 KB)
--
https://bugs.ruby-lang.org/