Skip to content

Commit

Permalink
Merge pull request #1320 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
osal Integration candidate: Caelum-rc4+dev27
  • Loading branch information
dzbaker authored Oct 26, 2022
2 parents fa9671f + c79db7a commit 4567e8b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

## Development Build: v6.0.0-rc4:dev143
## Development Build: v6.0.0-rc4+dev147
- adjust timing on condvar tests
- See <https://github.com/nasa/osal/pull/1319>

## Development Build: v6.0.0-rc4+dev143
- locks for condvar objects on rtems/vxworks
- Add time conversion reciprocal functions
- add export targets and package script
Expand Down
2 changes: 1 addition & 1 deletion src/os/inc/osapi-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/*
* Development Build Macro Definitions
*/
#define OS_BUILD_NUMBER 143
#define OS_BUILD_NUMBER 147
#define OS_BUILD_BASELINE "v6.0.0-rc4"

/*
Expand Down
14 changes: 10 additions & 4 deletions src/tests/condvar-test/condvar-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void condvar_worker(uint32 my_num)
++my_state->run_count;
UtPrintf("Doing Work task %u, mask=0x%x condition was=%x\n", (unsigned int)my_num, (unsigned int)my_state->mask,
(unsigned int)prev_condition);
OS_TaskDelay(50 + (NUM_TASKS * 5));
OS_TaskDelay(25 + (NUM_TASKS * 5));
}
}

Expand Down Expand Up @@ -169,7 +169,6 @@ void CondVarTest_Execute(void)
UtAssert_UINT32_EQ(total_work, num_signals);
UtAssert_UINT32_NEQ(curr_condition, ALL_RUN_CONDITION);
UtAssert_UINT32_NEQ(curr_condition, 0);
UtAssert_UINT32_EQ(task_states[i].run_count, 1);
UtAssert_INT32_EQ(OS_CondVarUnlock(condvar_id), OS_SUCCESS);

UtAssert_INT32_EQ(OS_CondVarSignal(condvar_id), OS_SUCCESS);
Expand All @@ -180,13 +179,19 @@ void CondVarTest_Execute(void)

/* after a the last signal, all the other tasks should have run */
UtAssert_INT32_EQ(OS_CondVarLock(condvar_id), OS_SUCCESS);
for (i = 0; i < NUM_TASKS; ++i)
{
UtAssert_UINT32_EQ(task_states[i].run_count, 1);
}
UtAssert_UINT32_EQ(total_work, num_signals);
UtAssert_BITMASK_UNSET(curr_condition, ALL_RUN_CONDITION);
curr_condition = ALL_RUN_CONDITION;
UtAssert_INT32_EQ(OS_CondVarBroadcast(condvar_id), OS_SUCCESS);
UtAssert_INT32_EQ(OS_CondVarUnlock(condvar_id), OS_SUCCESS);

OS_TaskDelay(100);
/* Give sufficient time for all tasks to wake up and do their work */
OS_TaskDelay(100 + (NUM_TASKS * 10));

UtAssert_INT32_EQ(OS_CondVarLock(condvar_id), OS_SUCCESS);
UtAssert_BITMASK_UNSET(curr_condition, ALL_RUN_CONDITION);
for (i = 0; i < NUM_TASKS; ++i)
Expand All @@ -198,7 +203,8 @@ void CondVarTest_Execute(void)
UtAssert_INT32_EQ(OS_CondVarBroadcast(condvar_id), OS_SUCCESS);
UtAssert_INT32_EQ(OS_CondVarUnlock(condvar_id), OS_SUCCESS);

OS_TaskDelay(20);
/* Give sufficient time for all tasks to wake up and do their work */
OS_TaskDelay(100 + (NUM_TASKS * 10));

UtAssert_INT32_EQ(OS_CondVarLock(condvar_id), OS_SUCCESS);
UtAssert_UINT32_EQ(total_work, (NUM_TASKS * 2) + 1);
Expand Down

0 comments on commit 4567e8b

Please sign in to comment.