From: "michal@... (Michal Rokos)" Date: 2013-09-03T18:19:33+09:00 Subject: [ruby-core:56983] [ruby-trunk - Feature #8793] Ruby 2.0 and Threads under HPUX Issue #8793 has been updated by michal@rokos.cz (Michal Rokos). Nobu, the merged patch (that is currently in the trunk) does not compile: compiling thread.c "thread_pthread.c", line 528: warning #2223-D: function "gettune" declared implicitly if (gettune("vps_pagesize", &pagesize)) { ^ "thread_pthread.c", line 534: warning #2171-D: invalid type conversion *addr = (void *)((size_t)((char *)_Asm_get_sp() - size) & ~(pagesize - 1)); ^ "thread_pthread.c", line 534: error #2137: expression must be a modifiable lvalue *addr = (void *)((size_t)((char *)_Asm_get_sp() - size) & ~(pagesize - 1)); ^ 1 error detected in the compilation of "thread.c". The error is due the missing * in the definition of hpux_attr_getstackaddr(): -hpux_attr_getstackaddr(const pthread_attr_t *attr, void *addr) +hpux_attr_getstackaddr(const pthread_attr_t *attr, void **addr) The gettune() is defined in as int gettune(const char *tunable, uint64_t *value); Otherwise the merged patch is OK. ---------------------------------------- Feature #8793: Ruby 2.0 and Threads under HPUX https://bugs.ruby-lang.org/issues/8793#change-41564 Author: michal@rokos.cz (Michal Rokos) Status: Feedback Priority: Normal Assignee: Category: Target version: Use of Threads under HPUX currently raise rb_eNotImpError ("ruby engine can initialize only in the main thread") since the STACKADDR_AVAILABLE is not available. This brings basic support for the get_stack() under HPUX. This patch also resolves issue under HPUX where signals usually cause the coredump since the stack size is too small. It seems that the patch is valid not only for Ruby 2.0, but also for Ruby 1.9. -- http://bugs.ruby-lang.org/