Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osal Integration candidate: Caelum-rc4+dev27 #1320

Merged
merged 3 commits into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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