Skip to content

Commit

Permalink
make usage of condition variable consistent between new unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cjhackillinois committed Jul 20, 2023
1 parent bd901f3 commit 65f9008
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/basics/qthread_fp.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct parts
int length;
float exp;
float ans;
aligned_t* cond;
aligned_t cond;
};

// https://www.w3resource.com/c-programming-exercises/math/c-math-exercise-24.php
Expand All @@ -42,15 +42,14 @@ static aligned_t taylor_exponential(void *arg)

static void checkFloat()
{
void* cond = malloc(QTHREAD_SIZEOF_ALIGNED_T);
struct parts teParts = {250,9.0f,0.0f, cond};
struct parts teParts = {250,9.0f,0.0f};
int ret = -1;
qthread_empty(teParts.cond);
qthread_empty(&teParts.cond);

ret = qthread_fork(taylor_exponential, &teParts, teParts.cond);
ret = qthread_fork(taylor_exponential, &teParts, &teParts.cond);
assert(ret == QTHREAD_SUCCESS);

ret = qthread_readFF(NULL, teParts.cond);
ret = qthread_readFF(NULL, &teParts.cond);
assert(ret == QTHREAD_SUCCESS);
}

Expand Down

0 comments on commit 65f9008

Please sign in to comment.