Commit 086e03de authored by Geoff Simmons's avatar Geoff Simmons

trackrdrd: Fixed an off-by-one error in the last commit

parent f8279e9a
...@@ -99,9 +99,9 @@ static void ...@@ -99,9 +99,9 @@ static void
pthread_exit((void *) &proddata); pthread_exit((void *) &proddata);
} }
#define consumer_exit(pcdata, reason) \ #define consumer_exit(pcdata, reason) \
do { \ do { \
(pcdata)->fail = (reason); \ (pcdata)->fail = (reason); \
pthread_exit((pcdata)); \ pthread_exit((pcdata)); \
} while(0) } while(0)
...@@ -109,7 +109,7 @@ static void ...@@ -109,7 +109,7 @@ static void
*consumer(void *arg) *consumer(void *arg)
{ {
int id = *((int *) arg), deqs = 0; int id = *((int *) arg), deqs = 0;
prod_con_data_t *pcdata = &condata[id]; prod_con_data_t *pcdata = &condata[id-1];
pcdata->sum = 0; pcdata->sum = 0;
pcdata->fail = SUCCESS; pcdata->fail = SUCCESS;
unsigned *xid; unsigned *xid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment