[前][次][番号順一覧][スレッド一覧][生データ]

yarv-dev-en:201

From: why the lucky stiff <why whytheluckystiff.net>
Date: Fri, 13 Oct 2006 11:36:27 -0500
Subject: [yarv-dev-en:201] [BUG] get_cpu_cnt leaves `th` and `mask` undefined

ko1, what architecture are you building yarv-parallel on?  Also, does it require
pthread?  (Trying to build on Linux and BSD.)

Had some errors from thread_pthread.h(get_cpu_cnt), so changed to:

  Index: thread_pthread.h
  ===================================================================
  --- thread_pthread.h    (revision 567)
  +++ thread_pthread.h    (working copy)
  @@ -574,6 +574,9 @@
   get_cpu_cnt(void)
   {
       int i;
  +    pthread_t th = pthread_self();
  +    cpu_set_t mask;
  +
       pthread_getaffinity_np(th, sizeof(cpu_set_t), &mask);
       for (i=0; i<32; i++) {
          if (!__CPU_ISSET(i, &mask)) {

_why

--
ML: yarv-dev-en quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧][生データ]

->     201 2006-10-14 01:36 [why whytheluckystiff] [BUG] get_cpu_cnt leaves `th` and `mask` undefined
       202 2006-10-15 08:47 ┣[why whytheluckystiff] close> Re: [BUG] get_cpu_cnt leaves `th` and `mask` undefined
       203 2006-10-18 17:42 ┗[ko1 atdot.net       ]