Skip to content

Commit 4b2e73a

Browse files
committed
NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
Batch update of latest cFS software release Reflects commit 3beb7f9933196076c4ca2b693e364ef996a77320 from NASA internal development repo
1 parent 3bcb137 commit 4b2e73a

796 files changed

Lines changed: 8750 additions & 2059 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
11
build
22
Makefile
3+
4+
# Ignore macOS generated files types
5+
.DS_Store
6+
.DS_Store?
7+
._*
8+
.Spotlight-V100
9+
.Trashes
10+
ehthumbs.db
11+
Thumbs.db
12+
.fuse_hidden*
13+

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
# OSAL resources.
8989
#
9090
######################################################################
91-
cmake_minimum_required(VERSION 3.5)
91+
cmake_minimum_required(VERSION 3.10)
9292

9393
# Set the policy dictating use of target_link_libraries across directories
9494
# Either OLD or NEW should work here but setting it to something avoids a
@@ -355,6 +355,7 @@ set(OSAL_SRCLIST
355355
src/os/shared/src/osapi-network.c
356356
src/os/shared/src/osapi-printf.c
357357
src/os/shared/src/osapi-queue.c
358+
src/os/shared/src/osapi-rwlock.c
358359
src/os/shared/src/osapi-select.c
359360
src/os/shared/src/osapi-shell.c
360361
src/os/shared/src/osapi-sockets.c
@@ -370,7 +371,6 @@ if (OSAL_CONFIG_DEBUG_PRINTF)
370371
)
371372
endif (OSAL_CONFIG_DEBUG_PRINTF)
372373

373-
374374
# Define the external "osal" static library target
375375
# This is a combination of the generic parts with the low level
376376
# system-specific parts
@@ -419,7 +419,7 @@ if (ENABLE_UNIT_TESTS)
419419
target_link_libraries(${TGTNAME} PUBLIC ut_assert osal)
420420
add_test(${TGTNAME} ${TGTNAME})
421421
foreach(TGT ${INSTALL_TARGET_LIST})
422-
install(TARGETS ${TGTNAME} DESTINATION ${TGT}/${UT_INSTALL_SUBDIR})
422+
install(TARGETS ${TGTNAME} DESTINATION ${TGT})
423423
endforeach()
424424

425425
endfunction(add_osal_ut_exe)

default_config.cmake

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,33 @@ set(OSAL_CONFIG_CONSOLE_ASYNC TRUE
206206
CACHE BOOL "Controls spawning of a separate utility task for OS_printf"
207207
)
208208

209+
#
210+
# OS_CONFIG_RWLOCK
211+
# ----------------------------------
212+
#
213+
# Controls whether the readers-writer lock object is included in the compilation
214+
# process of the OSAL.
215+
#
216+
# If set FALSE, the relevant source and header files will be excluded in the compilation
217+
# of OSAL, such that the object is still registered with the Object ID system
218+
# but its associated functions won't be defined or declared.
219+
#
220+
# If set TRUE, the relevant source and header files will be included in the compilation
221+
# of OSAL, and all it's associated functions will be callable.
222+
#
223+
# When this is TRUE (default), it gives the ability to create a readers-writer lock as
224+
# an alternative to synchronization with mutexes for data structures that are read-heavy.
225+
# It allows for either an infinite number of readers to be accessing a data structure or
226+
# a single writer.
227+
#
228+
# This option is available since some platforms may not support readers-writer locks, so
229+
# any use of a readers-writer lock should also create an implementation using solely
230+
# mutexes.
231+
#
232+
set(OSAL_CONFIG_RWLOCK TRUE
233+
CACHE BOOL "Controls the inclusion of readers-writer lock objects in the code"
234+
)
235+
209236
#############################################
210237
# Resource Limits for the OS API
211238
#############################################
@@ -238,6 +265,11 @@ set(OSAL_CONFIG_MAX_MUTEXES 20
238265
CACHE STRING "Maximum Number of Mutexes to support"
239266
)
240267

268+
# The maximum number of rwlocks to support
269+
set(OSAL_CONFIG_MAX_RWLOCKS 20
270+
CACHE STRING "Maximum Number of RwLocks to support"
271+
)
272+
241273
# The maximum number of condition variables to support
242274
set(OSAL_CONFIG_MAX_CONDVARS 4
243275
CACHE STRING "Maximum Number of Condition Variables to support"

docs/src/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
# in a standalone build environment.
2929
#
3030

31-
cmake_minimum_required(VERSION 3.5)
3231
project(OSAL_DOCS NONE)
3332

3433
# List of dox files to include -

osconfig.h.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@
7171
*/
7272
#define OS_MAX_MUTEXES @OSAL_CONFIG_MAX_MUTEXES@
7373

74+
/**
75+
* \brief The maximum number of rwlocks to support
76+
*
77+
* Based on the OSAL_CONFIG_MAX_RWLOCKS configuration option
78+
*/
79+
#define OS_MAX_RWLOCKS @OSAL_CONFIG_MAX_RWLOCKS@
80+
7481
/**
7582
* \brief The maximum number of condition variables to support
7683
*

src/bsp/generic-linux/src/bsp_console.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/************************************************************************
2-
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes”
2+
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
33
*
4-
* Copyright (c) 2020 United States Government as represented by the
4+
* Copyright (c) 2023 United States Government as represented by the
55
* Administrator of the National Aeronautics and Space Administration.
66
* All Rights Reserved.
77
*

src/bsp/generic-linux/src/bsp_start.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/************************************************************************
2-
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes”
2+
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
33
*
4-
* Copyright (c) 2020 United States Government as represented by the
4+
* Copyright (c) 2023 United States Government as represented by the
55
* Administrator of the National Aeronautics and Space Administration.
66
* All Rights Reserved.
77
*

src/bsp/generic-linux/src/generic_linux_bsp_internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/************************************************************************
2-
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes”
2+
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
33
*
4-
* Copyright (c) 2020 United States Government as represented by the
4+
* Copyright (c) 2023 United States Government as represented by the
55
* Administrator of the National Aeronautics and Space Administration.
66
* All Rights Reserved.
77
*

src/bsp/generic-qnx/CMakeLists.txt

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
######################################################################
2+
#
3+
# CMAKE build recipe for QNX Board Support Package (BSP)
4+
#
5+
######################################################################
6+
7+
# This basic implementation library should be generic enough to use
8+
# on any QNX based processor board.
9+
add_library(osal_generic-qnx_impl OBJECT
10+
src/bsp_start.c
11+
src/bsp_console.c
12+
)
13+
14+
# OSAL needs conformance to at least POSIX.1c (aka POSIX 1995) - this includes all the
15+
# real-time support and threading extensions.
16+
#
17+
# When compiling against glibc, using "_XOPEN_SOURCE=600" enables the X/Open 6 standard.
18+
# XPG6 includes all necessary XPG5, POSIX.1c features as well as SUSv2/UNIX98 extensions.
19+
# This OSAL implementation uses clock_nanosleep(), mq_timedreceive(), and
20+
# mq_timedsend() which are enhancements added in the XPG6 standard.
21+
#
22+
# See http://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
23+
# for a more detailed description of the feature test macros and available values
24+
target_compile_definitions(osal_public_api INTERFACE
25+
_XOPEN_SOURCE=600
26+
)
27+
28+
# QNX system libraries required for the final link of applications using OSAL
29+
if (QNX_SDP_VERSION EQUAL 800)
30+
target_link_libraries(osal_public_api INTERFACE
31+
socket unwind unwind-nto unwind-generic
32+
)
33+
elseif (QNX_SDP_VERSION EQUAL 710)
34+
target_link_libraries(osal_public_api INTERFACE
35+
socket backtrace
36+
)
37+
endif()
38+
39+
# This BSP only works with "qnx" OS layer.
40+
# Confirming this reduces risk of accidental misconfiguration
41+
set_property(TARGET osal_generic-qnx_impl PROPERTY OSAL_EXPECTED_OSTYPE "qnx")
42+
43+
# Configure the ut_coverage_compile and ut_coverage_link for enabling coverage
44+
# testing on this platform.
45+
if (NOT CMAKE_CROSSCOMPILING AND ENABLE_UNIT_TESTS)
46+
# Support for other compilers/coverage tools could be added here.
47+
# for now only the GNU "gcov" will be enabled
48+
if (CMAKE_C_COMPILER_ID STREQUAL GNU)
49+
target_compile_options(ut_coverage_compile INTERFACE -pg -ftest-coverage -fprofile-arcs)
50+
target_link_libraries(ut_coverage_link INTERFACE gcov)
51+
endif()
52+
endif()
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
##########################################################################
2+
#
3+
# Build options for "generic-qnx" BSP
4+
#
5+
##########################################################################
6+
7+
# C flags that should be used when (re-) compiling code for unit testing.
8+
# Note: --coverage is just a shortcut for "-ftest-coverage" and "-fprofile-arcs"
9+
# This also does not work well when cross compiling since paths to the _compile_ dir
10+
# are baked into the executables, so they will not be there when copied to the target
11+
# Note - although GCC understands the same flags for compile and link here, this may
12+
# not be true on all platforms so the compile and link flags are specified separately.
13+
if (NOT CMAKE_CROSSCOMPILING AND NOT OSAL_OMIT_DEPRECATED)
14+
# The variables here (UT_COVERAGE_COMPILE_FLAGS/LINK_FLAGS) should be phased out, prefer
15+
# to use the interface libraries (ut_coverage_compile/link) instead, which are more flexible.
16+
set(UT_COVERAGE_COMPILE_FLAGS -pg --coverage)
17+
set(UT_COVERAGE_LINK_FLAGS -pg --coverage)
18+
endif()

0 commit comments

Comments
 (0)