Skip to content

Commit 4cc6dbb

Browse files
authored
Merge pull request #1191 from astrogeco/integration-candidate
osal Integration candidate: Caelum+dev1
2 parents 42af0f7 + 30635f8 commit 4cc6dbb

File tree

8 files changed

+84
-9
lines changed

8 files changed

+84
-9
lines changed

.github/workflows/local_unit_test.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,23 @@ on:
55
pull_request:
66

77
jobs:
8+
#Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action.
9+
check-for-duplicates:
10+
runs-on: ubuntu-latest
11+
# Map a step output to a job output
12+
outputs:
13+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
14+
steps:
15+
- id: skip_check
16+
uses: fkirc/skip-duplicate-actions@master
17+
with:
18+
concurrent_skipping: 'same_content'
19+
skip_after_successful_duplicate: 'true'
20+
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
821

922
Local-Unit-Test:
23+
needs: check-for-duplicates
24+
if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }}
1025
runs-on: ubuntu-18.04
1126
timeout-minutes: 15
1227

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,26 @@ The autogenerated OSAL user's guide can be viewed at <https://github.com/nasa/cF
1111

1212
## Version History
1313

14+
### Development Build: v6.0.0-rc4+dev15
15+
16+
- Add Duplicate Check to Local Unit Test
17+
- Rename OS_XXXTime to OS_XXXLocalTime in comments
18+
- Fix vxWorks intLib stub aliasing issue
19+
- Recognize ifdef __cplusplus
20+
- Remove extern in stub prototypes
21+
- Add typedef for OSAL status codes
22+
- Set new build baseline for cFS-Caelum-rc4: v6.0.0-rc4
23+
- See <https://github.com/nasa/osal/pull/1191> and <https://github.com/nasa/cFS/pull/390>
24+
25+
1426
### Development Build: v5.1.0-rc1+dev619
1527

1628
- Enable symbol api test and MIR dump too large
1729
- MIR symbol too long or table to long for osloader test
1830
- Add bsp-specific configuration flag registry
1931
- Add os-specifc socket flag function
2032
- See <https://github.com/nasa/osal/pull/1158> and <https://github.com/nasa/cFS/pull/359>
33+
2134
### Development Build: v5.1.0-rc1+dev604
2235

2336
- Add typecast to memchr call

src/os/inc/common_types.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ extern "C"
118118
*/
119119
typedef uint32 osal_objtype_t;
120120

121+
/**
122+
* The preferred type to represent OSAL status codes defined in osapi-error.h
123+
*/
124+
typedef int32 osal_status_t;
125+
121126
/**
122127
* @brief General purpose OSAL callback function
123128
*
@@ -155,5 +160,6 @@ extern "C"
155160
#define OSAL_BLOCKCOUNT_C(X) ((osal_blockcount_t)(X))
156161
#define OSAL_INDEX_C(X) ((osal_index_t)(X))
157162
#define OSAL_OBJTYPE_C(X) ((osal_objtype_t)(X))
163+
#define OSAL_STATUS_C(X) ((osal_status_t)(X))
158164

159165
#endif /* COMMON_TYPES_H */

src/os/inc/osapi-error.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,22 @@ typedef char os_err_name_t[OS_ERROR_NAME_LENGTH];
138138
* @{
139139
*/
140140

141+
/*-------------------------------------------------------------------------------------*/
142+
/**
143+
* @brief Convert a status code to a native "long" type
144+
*
145+
* For printing or logging purposes, this converts the given status code
146+
* to a "long" (signed integer) value. It should be used in conjunction
147+
* with the "%ld" conversion specifier in printf-style statements.
148+
*
149+
* @param[in] Status Execution status, see @ref OSReturnCodes
150+
* @return Same status value converted to the "long" data type
151+
*/
152+
static inline long OS_StatusToInteger(osal_status_t Status)
153+
{
154+
return (long)Status;
155+
}
156+
141157
/*-------------------------------------------------------------------------------------*/
142158
/**
143159
* @brief Convert an error number to a string

src/os/inc/osapi-version.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
/*
3737
* Development Build Macro Definitions
3838
*/
39-
#define OS_BUILD_NUMBER 619
40-
#define OS_BUILD_BASELINE "v5.1.0-rc1"
39+
#define OS_BUILD_NUMBER 15
40+
#define OS_BUILD_BASELINE "v6.0.0-rc4"
4141

4242
/*
4343
* Version Macro Definitions
@@ -68,7 +68,7 @@
6868
/*! @brief Version code name
6969
* All modular components which are tested/validated together should share the same code name
7070
*/
71-
#define OS_VERSION_CODENAME "Bootes"
71+
#define OS_VERSION_CODENAME "Draco"
7272

7373
/*! @brief Development Build Version String.
7474
* @details Reports the current development build's baseline, number, and name. Also includes a note about the latest

src/os/portable/os-impl-posix-gettime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* \file os-impl-posix-gettime.c
2323
* \author joseph.p.hickey@nasa.gov
2424
*
25-
* This file contains implementation for OS_GetTime() and OS_SetTime()
25+
* This file contains implementation for OS_GetLocalTime() and OS_SetLocalTime()
2626
* that map to the C library clock_gettime() and clock_settime() calls.
2727
* This should be usable on any OS that supports those standard calls.
2828
* The OS-specific code must \#include the correct headers that define the

src/unit-test-coverage/ut-stubs/src/vxworks-intLib-stubs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,12 @@ OCS_VOIDFUNCPTR *OCS_INUM_TO_IVEC(unsigned int ui)
5454
OCS_VOIDFUNCPTR * VecTbl;
5555
static OCS_VOIDFUNCPTR DummyVec;
5656
size_t VecTblSize;
57+
void * GenericPtr;
5758

5859
if (Status == 0)
5960
{
60-
UT_GetDataBuffer(UT_KEY(OCS_INUM_TO_IVEC), (void **)&VecTbl, &VecTblSize, NULL);
61+
UT_GetDataBuffer(UT_KEY(OCS_INUM_TO_IVEC), &GenericPtr, &VecTblSize, NULL);
62+
VecTbl = GenericPtr;
6163
if (VecTbl != NULL && ui < (VecTblSize / sizeof(OCS_VOIDFUNCPTR)))
6264
{
6365
VecTbl += ui;

ut_assert/scripts/generate_stubs.pl

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
my $file = "";
111111
my $file_boilerplate;
112112
my $file_variadic;
113+
my @ifdef_level = (1);
113114

114115
# All header files start with some legal boilerplate comments
115116
# Take the first one and save it, so it can be put into the output.
@@ -125,7 +126,31 @@
125126
# so it will be in a single "line" in the result.
126127
chomp if (s/\\$//);
127128
}
128-
push(@lines, $_);
129+
130+
# detect "#ifdef" lines - some may need to be recognized.
131+
# at the very least, any C++-specific bits need to be skipped.
132+
# for now this just specifically looks for __cplusplus
133+
if (/^\#(if\w+)\s+(.*)$/) {
134+
my $check = $1;
135+
my $cond = $2;
136+
my $result = $ifdef_level[0];
137+
138+
if ($cond eq "__cplusplus" && $check eq "ifdef") {
139+
$result = 0;
140+
}
141+
142+
unshift(@ifdef_level, $result);
143+
}
144+
elsif (/^\#else/) {
145+
# invert the last preprocessor condition
146+
$ifdef_level[0] = $ifdef_level[0] ^ $ifdef_level[1];
147+
}
148+
elsif (/^\#endif/) {
149+
shift(@ifdef_level);
150+
}
151+
elsif ($ifdef_level[0]) {
152+
push(@lines, $_) ;
153+
}
129154
}
130155
close(HDR);
131156

@@ -164,7 +189,6 @@
164189
next if (/\btypedef\b/); # ignore typedefs
165190
next if (/\bstatic inline\b/); # ignore
166191

167-
168192
# discard "extern" qualifier
169193
# (but other qualifiers like "const" are OK and should be preserved, as
170194
# it is part of return type).
@@ -327,7 +351,7 @@
327351
if ($fileapi->{$funcname}->{variadic}) {
328352
$args .= ", va_list";
329353
}
330-
print OUT "extern void ".$handler_func->{$funcname}."($args);\n";
354+
print OUT "void ".$handler_func->{$funcname}."($args);\n";
331355
}
332356
}
333357

@@ -408,4 +432,3 @@
408432

409433
print "Generated $stubfile\n";
410434
}
411-

0 commit comments

Comments
 (0)