Skip to content

Commit d698a4d

Browse files
authored
Merge pull request #690 from nasa/integration-candidate
OSAL Integration Candidate: 2020-12-22
2 parents 9407cdf + 7214d38 commit d698a4d

File tree

430 files changed

+7790
-5510
lines changed

Some content is hidden

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

430 files changed

+7790
-5510
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ The autogenerated OSAL user's guide can be viewed at <https://github.com/nasa/cF
1010

1111
## Version History
1212

13+
### Development Build: 5.1.0-rc1+dev132
14+
15+
- Convert the OSAL Configuration Guide from docx and pdf to a markdown file.
16+
- Test Tasks do not run at 100%. Move all definitions and instantiations out of the core-test header file and reuse the already-existing single task definition.
17+
- Break up `osapi-os-*.h` files into units that correspond to the implementation units. Kept old header file names for compatibility.
18+
- Reworks the POSIX global lock implementation. Does not change the POSIX signal mask when locking/unlocking the global.
19+
- Fixes a race condition.
20+
- Adds a condition variable to the global lock structure. improves handling of tasks competing for access to the same object.
21+
- No longer changing signal masks repeatedly/unexpectedly. May be relevant to some BSP/driver developers.
22+
- Checks return of sysconf for error and reports them. Only sets PageSize on success. If sysconf fails it provides a mechanism to avoid error propagation.
23+
- Uses `errno` instead of status return from `clock_getres` with `strerror` reporting.
24+
- Adds support for VxWorks 7
25+
- See <https://github.com/nasa/osal/pull/690>
26+
1327
### Development Build: 5.1.0-rc1+dev109
1428

1529
- Add support for RTEMS 5.1 in the OSAL and provides defines and necessary ifdefs so RTEMS 4.11 can continue to be supported.

default_config.cmake

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,53 @@
1515
#
1616
##########################################################################
1717

18+
##############################################################
19+
# Argument/Bug-checking options
20+
##############################################################
21+
22+
# OSAL_CONFIG_BUGCHECK_DISABLE
23+
# ----------------------------------
24+
#
25+
# Disable/compile-out the "bugcheck" macro
26+
#
27+
# The bugcheck macro is used to validate the inputs to functions and/or
28+
# assert on other conditions that should _always_ be true. If any of these
29+
# conditions ever evaluate as false, it indicates a bug in the code -
30+
# either in the OSAL or the application which invoked OSAL.
31+
#
32+
# If set FALSE (default), then the OSAL bugcheck macro will evaluate its
33+
# boolean conditional and generate an action if that conditional evaulates
34+
# false. (The specific action to take is configured via a different
35+
# directive -- see OSAL_CONFIG_BUGCHECK_STRICT).
36+
#
37+
# These extra bug checks do consume a slight bit of code+data space as
38+
# well as some runtime CPU cycles on every call, depending on the conditions
39+
# being tested.
40+
#
41+
# Once the application has reached a sufficient level of stability and
42+
# confidence is obtained that these bug checks are not possible to be
43+
# triggered, this directive may be set TRUE which disables the bug checks
44+
# completely - rendering these statements as no-ops.
45+
#
46+
set(OSAL_CONFIG_BUGCHECK_DISABLE FALSE)
47+
48+
49+
# OSAL_CONFIG_BUGCHECK_STRICT
50+
# ----------------------------------
51+
#
52+
# Select a strict implementation for the "bugcheck" macro
53+
#
54+
# If set FALSE (default), then the OSAL bugcheck macro will generate a
55+
# debug message and return an error code if the conditional evaluates
56+
# as false. This is a soft error - the application will get the
57+
# error code and keep running.
58+
#
59+
# If set to TRUE, then any failure of any bugcheck macro is considered
60+
# fatal and will trigger an abort(). On many platforms this will
61+
# generate an abnormal application exit with a core file for debugging.
62+
#
63+
set(OSAL_CONFIG_BUGCHECK_STRICT FALSE)
64+
1865

1966
##############################################################
2067
# Code/Feature Selection Options for the OSAL implementation

doc/OSAL-Configuration-Guide.md

Lines changed: 869 additions & 0 deletions
Large diffs are not rendered by default.

doc/OSAL-Configuration-guide.doc

-420 KB
Binary file not shown.

doc/OSAL-Configuration-guide.pdf

-781 KB
Binary file not shown.

osconfig.h.in

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,41 @@
2020

2121
/**
2222
* \brief Configuration file Operating System Abstraction Layer
23-
*
23+
*
2424
* The specific definitions in this file may only be modified
25-
* by setting the respective OSAL configuration options in the CMake
26-
* build.
25+
* by setting the respective OSAL configuration options in the CMake
26+
* build.
2727
*
2828
* Any direct modifications to the generated copy will
29-
* be overwritten each time CMake executes.
29+
* be overwritten each time CMake executes.
3030
*
3131
* \note This file was automatically generated by CMake from
3232
* @CMAKE_CURRENT_SOURCE_DIR@/default_config.cmake
3333
*/
34-
35-
#ifndef INCLUDE_OSCONFIG_H_
36-
#define INCLUDE_OSCONFIG_H_
3734

38-
/*
39-
* OSAL feature selection options from build config
35+
#ifndef OSCONFIG_H
36+
#define OSCONFIG_H
37+
38+
/*
39+
* OSAL feature selection options from build config
4040
*/
4141
#cmakedefine OSAL_CONFIG_INCLUDE_DYNAMIC_LOADER
42-
#cmakedefine OSAL_CONFIG_INCLUDE_NETWORK
43-
#cmakedefine OSAL_CONFIG_INCLUDE_STATIC_LOADER
42+
#cmakedefine OSAL_CONFIG_INCLUDE_NETWORK
43+
#cmakedefine OSAL_CONFIG_INCLUDE_STATIC_LOADER
4444
#cmakedefine OSAL_CONFIG_INCLUDE_SHELL
45-
#cmakedefine OSAL_CONFIG_DEBUG_PRINTF
46-
#cmakedefine OSAL_CONFIG_DEBUG_PERMISSIVE_MODE
45+
#cmakedefine OSAL_CONFIG_DEBUG_PRINTF
46+
#cmakedefine OSAL_CONFIG_DEBUG_PERMISSIVE_MODE
4747

48-
/*
48+
#cmakedefine OSAL_CONFIG_BUGCHECK_DISABLE
49+
#cmakedefine OSAL_CONFIG_BUGCHECK_STRICT
50+
51+
/*
4952
* OSAL resource limits from build config
5053
*
5154
* (These are prefixed with OS_ for compatibility
5255
* with existing code referencing these symbols)
5356
*/
54-
57+
5558
/**
5659
* \brief The maximum number of to support
5760
*
@@ -140,8 +143,8 @@
140143

141144
/**
142145
* \brief The maximum length of OSAL file names
143-
*
144-
* This limit applies specifically to the file name portion, not the
146+
*
147+
* This limit applies specifically to the file name portion, not the
145148
* directory portion, of a path name.
146149
*
147150
* Based on the OSAL_CONFIG_MAX_FILE_NAME configuration option
@@ -175,14 +178,14 @@
175178
* \brief The maximum size of the socket address structure
176179
*
177180
* This is part of the Socket API, and should be set large enough to hold
178-
* the largest address type in use on the target system.
181+
* the largest address type in use on the target system.
179182
*
180183
* Based on the OSAL_CONFIG_SOCKADDR_MAX_LEN configuration option
181184
*/
182185
#define OS_SOCKADDR_MAX_LEN @OSAL_CONFIG_SOCKADDR_MAX_LEN@
183186

184187
/**
185-
* \brief The maximum size of output produced by a single OS_printf()
188+
* \brief The maximum size of output produced by a single OS_printf()
186189
*
187190
* Based on the OSAL_CONFIG_PRINTF_BUFFER_SIZE configuration option
188191
*/
@@ -234,7 +237,7 @@
234237
#define OS_QUEUE_MAX_DEPTH @OSAL_CONFIG_QUEUE_MAX_DEPTH@
235238

236239
/**
237-
* \brief The name of the temporary file used to store shell commands
240+
* \brief The name of the temporary file used to store shell commands
238241
*
239242
* This configuration is only applicable if shell support is enabled, and
240243
* only necessary/relevant on some OS implementations.
@@ -251,14 +254,14 @@
251254
*
252255
* Based on the OSAL_CONFIG_PRINTF_CONSOLE_NAME configuration option
253256
*/
254-
#define OS_PRINTF_CONSOLE_NAME "@OSAL_CONFIG_PRINTF_CONSOLE_NAME@"
257+
#define OS_PRINTF_CONSOLE_NAME "@OSAL_CONFIG_PRINTF_CONSOLE_NAME@"
255258

256-
/*
259+
/*
257260
* OSAL fixed resource limits
258261
*
259262
* The resource limits here are not user-configurable, but
260-
* may be changed in a future revision of OSAL, so it is
261-
* still present in osconfig.h along with the others.
263+
* may be changed in a future revision of OSAL, so it is
264+
* still present in osconfig.h along with the others.
262265
*/
263266

264267
/**
@@ -269,11 +272,19 @@
269272
#define OS_MAX_CONSOLES 1
270273

271274
/**
272-
* \brief The system-specific file extension used on loadable module files
275+
* \brief The system-specific file extension used on loadable module files
273276
*
274277
* Fixed value based on system selection, not user configurable.
275278
*/
276279
#define OS_MODULE_FILE_EXTENSION "@CMAKE_SHARED_LIBRARY_SUFFIX@"
277280

281+
/*
282+
** Length of a Device and Volume name
283+
*/
284+
#define OS_FS_DEV_NAME_LEN 32 /**< Device name length */
285+
#define OS_FS_PHYS_NAME_LEN 64 /**< Physical drive name length */
286+
#define OS_FS_VOL_NAME_LEN 32 /**< Volume name length */
287+
288+
289+
#endif /* OSCONFIG_H */
278290

279-
#endif /* INCLUDE_OSCONFIG_H_ */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
* OSAL BSP debug console abstraction
2626
*/
2727

28+
#include <stdio.h>
29+
#include <stdlib.h>
2830
#include <string.h>
2931
#include <unistd.h>
3032
#include <sys/types.h>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* 2005/07/26 A. Cudmore | Initial version for linux
2929
*/
3030

31+
#include <stdio.h>
3132
#include <string.h>
3233
#include <unistd.h>
3334
#include <stdlib.h>

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
#ifndef GENERIC_LINUX_BSP_INTERNAL_H_
2929
#define GENERIC_LINUX_BSP_INTERNAL_H_
3030

31-
#include "osapi.h"
31+
#include "osapi-common.h"
32+
#include "osapi-bsp.h"
33+
#include "osapi-error.h"
3234
#include "bsp-impl.h"
3335

3436
/*
@@ -44,4 +46,4 @@ typedef struct
4446
*/
4547
extern OS_BSP_GenericLinuxGlobalData_t OS_BSP_GenericLinuxGlobal;
4648

47-
#endif /* GENERIC_LINUX_BSP_INTERNAL_H_ */
49+
#endif /* GENERIC_LINUX_BSP_INTERNAL_H */

src/bsp/generic-vxworks/src/generic_vxworks_bsp_internal.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
/*
3232
** OSAL includes
3333
*/
34-
#include "osapi.h"
3534
#include "bsp-impl.h"
3635

37-
#endif /* GENERIC_VXWORKS_BSP_INTERNAL_H_ */
36+
#endif /* GENERIC_VXWORKS_BSP_INTERNAL_H */

0 commit comments

Comments
 (0)