Revision: 54891
http://brlcad.svn.sourceforge.net/brlcad/?rev=54891&view=rev
Author: brlcad
Date: 2013-03-26 20:42:08 +0000 (Tue, 26 Mar 2013)
Log Message:
-----------
clean up the array indexing, inconsistently unconventional
Modified Paths:
--------------
brlcad/trunk/src/libbu/parallel.c
Modified: brlcad/trunk/src/libbu/parallel.c
===================================================================
--- brlcad/trunk/src/libbu/parallel.c 2013-03-26 20:38:03 UTC (rev 54890)
+++ brlcad/trunk/src/libbu/parallel.c 2013-03-26 20:42:08 UTC (rev 54891)
@@ -717,9 +717,9 @@
/* Fill in the data of user_thread_data_bu structures of all threads */
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;
+ user_thread_data_bu[x].user_func = func;
+ user_thread_data_bu[x].user_arg = arg;
+ user_thread_data_bu[x].cpu_id = x;
}
/* if we're in debug mode, allow additional cpus */
@@ -959,7 +959,7 @@
/* Create the threads */
for (x = 0; x < ncpu; x++) {
- if (thr_create(0, 0, (void *(*)(void *))parallel_interface_arg,
(user_thread_data_bu + x), 0, &thread)) {
+ if (thr_create(0, 0, (void *(*)(void *))parallel_interface_arg,
&user_thread_data_bu[x], 0, &thread)) {
fprintf(stderr, "ERROR: bu_parallel: thr_create(0x0, 0x0, 0x%x,
0x0, 0, 0x%x) failed on processor %d\n",
parallel_interface_arg, &thread, x);
bu_log("ERROR: bu_parallel: thr_create(0x0, 0x0, 0x%x, 0x0, 0,
0x%x) failed on processor %d\n",
@@ -1034,7 +1034,7 @@
pthread_attr_init(&attrs);
pthread_attr_setstacksize(&attrs, 10*1024*1024);
- if (pthread_create(&thread, &attrs, (void *(*)(void
*))parallel_interface_arg, (user_thread_data_bu + x))) {
+ if (pthread_create(&thread, &attrs, (void *(*)(void
*))parallel_interface_arg, &user_thread_data_bu[x])) {
fprintf(stderr, "ERROR: bu_parallel: pthread_create(0x0, 0x0,
0x%lx, 0x0, 0, 0x%lx) failed on processor %d\n",
(unsigned long int)parallel_interface_arg, (unsigned long
int)&thread, x);
bu_log("ERROR: bu_parallel: pthread_create(0x0, 0x0, 0x%lx, 0x0, 0,
%p) failed on processor %d\n",
@@ -1114,7 +1114,7 @@
NULL,
0,
(LPVOID)parallel_interface,
- (user_thread_data_bu + x),
+ &user_thread_data_bu[x],
0,
&dwThreadIdArray[i]);
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