Revision: 54943
http://brlcad.svn.sourceforge.net/brlcad/?rev=54943&view=rev
Author: brlcad
Date: 2013-03-28 17:37:38 +0000 (Thu, 28 Mar 2013)
Log Message:
-----------
hindsight consideration, don't pretend we'd ever be able to talk to 'thread' 0
since it's going to be sitting there waiting for the invoked threads to finish.
kinda like execl. so number them 0 to ncpu-1
Modified Paths:
--------------
brlcad/trunk/src/libbu/parallel.c
Modified: brlcad/trunk/src/libbu/parallel.c
===================================================================
--- brlcad/trunk/src/libbu/parallel.c 2013-03-28 17:34:14 UTC (rev 54942)
+++ brlcad/trunk/src/libbu/parallel.c 2013-03-28 17:37:38 UTC (rev 54943)
@@ -454,7 +454,7 @@
for(x = 0; x < ncpu; x++) {
user_thread_data_bu[x].user_func = func;
user_thread_data_bu[x].user_arg = arg;
- user_thread_data_bu[x].cpu_id = x + 1; /* index from 1 */
+ user_thread_data_bu[x].cpu_id = x;
user_thread_data_bu[x].counted = 0;
}
@@ -491,7 +491,7 @@
if (thr_create(0, 0, (void *(*)(void *))parallel_interface_arg,
&user_thread_data_bu[x], 0, &thread)) {
bu_log("ERROR: bu_parallel: thr_create(0x0, 0x0, 0x%x, 0x0, 0,
0x%x) failed for processor thread # %d\n",
- parallel_interface_arg, &thread, x+1);
+ parallel_interface_arg, &thread, x);
/* Not much to do, lump it */
} else {
if (UNLIKELY(bu_debug & BU_DEBUG_PARALLEL))
@@ -566,7 +566,7 @@
if (pthread_create(&thread, &attrs, (void *(*)(void
*))parallel_interface_arg, &user_thread_data_bu[x])) {
bu_log("ERROR: bu_parallel: pthread_create(0x0, 0x0, 0x%lx, 0x0, 0,
%p) failed for processor thread # %d\n",
- (unsigned long int)parallel_interface_arg, (void *)&thread,
x+1);
+ (unsigned long int)parallel_interface_arg, (void *)&thread,
x);
/* Not much to do, lump it */
} else {
if (UNLIKELY(bu_debug & BU_DEBUG_PARALLEL)) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits