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: 2021-02-23 #830

Merged
merged 16 commits into from
Feb 26, 2021
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
47 changes: 29 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@ The autogenerated OSAL user's guide can be viewed at <https://github.com/nasa/cF

## Version History

### Development Build: 5.1.0-rc1+dev262
### Development Build: v5.1.0-rc1+dev280

- Makes tests skip after getting their first not implemented error.
- Updates stub helpers to match the behavior of calling the default implementation stub macro (NULL VA list)
- Removes redundant logic and assignment to fix static analysis warnings
- Truncates at the end of the logic flow for socket name as opposed to possibly 3 different locations. Fixes static analysis warning.
- Renames `timer_id` in unit tests to `local_timer_id` to avoid conflicts
- Removes all deprecated elements
- No behavior change. Renames `UT_Stub_CheckForceFail` to `UT_Stub_CheckDefaultReturnValue`, also only sets `Value` if not `NULL` (can pass in NULL value doesn't matter)
- See <https://github.com/nasa/osal/pull/830>

### Development Build: v5.1.0-rc1+dev262

- Adds test cases for `OS_ObjectIdFinalizeDelete`, `OS_DeleteAllObjects`, and others to get 100% line and function coverage on VxWorks and shared/portable layers.
- Ensures APIs check for `NULL` inputs or have documentation stating that a null value is allowed.
Expand All @@ -33,7 +44,7 @@ The autogenerated OSAL user's guide can be viewed at <https://github.com/nasa/cF
- No behavior change, applies the standard formatting using `clang-format`
- See <https://github.com/nasa/osal/pull/774>

### Development Build: 5.1.0-rc1+dev221
### Development Build: v5.1.0-rc1+dev221

- Fixes `printf` format to correctly build in RTEMS-5.
- **Deprecates `OS_fsBlocksFree()` and `OS_fsBytesFree()`** in favor of `OS_FileSysStatVolume()`.
Expand All @@ -52,7 +63,7 @@ The autogenerated OSAL user's guide can be viewed at <https://github.com/nasa/cF
- Unit Test: Installs the modules used in unit testing and adds removal of post-test, left-over files.
- See <https://github.com/nasa/osal/pulls/767>

### Development Build: 5.1.0-rc1+dev184
### Development Build: v5.1.0-rc1+dev184

- Address issues with OSAL global table management:
- use iterators whenever possible
Expand All @@ -78,7 +89,7 @@ The autogenerated OSAL user's guide can be viewed at <https://github.com/nasa/cF
- Adds access functions to convert/extract different units from an OS_time_t value - so that other code in CFE/PSP/Apps can be updated to use the access functions and thereby not break when the internal time definition changes. Replaces the `int32` with `OS_time_t` in the "stat" structure used by the file module. Updates the pointer argument to `OS_SetLocalTime()` to be `const`. Prototype change of `OS_SetLocalTime()` should be backward compatible.
- See <https://github.com/nasa/osal/pulls/750>

### Development Build: 5.1.0-rc1+dev149
### Development Build: v5.1.0-rc1+dev149

- Document UtAssert_Message parameters, also adds "see also" note for helper macros.
- Fix doxygen typo
Expand All @@ -88,7 +99,7 @@ The autogenerated OSAL user's guide can be viewed at <https://github.com/nasa/cF
- Add cppcheck static analysis workflow to osal CI
- See <https://github.com/nasa/osal/pull/744>

### Development Build: 5.1.0-rc1+dev132
### Development Build: v5.1.0-rc1+dev132

- Convert the OSAL Configuration Guide from docx and pdf to a markdown file.
- 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.
Expand All @@ -102,7 +113,7 @@ The autogenerated OSAL user's guide can be viewed at <https://github.com/nasa/cF
- Adds support for VxWorks 7
- See <https://github.com/nasa/osal/pull/690>

### Development Build: 5.1.0-rc1+dev109
### Development Build: v5.1.0-rc1+dev109

- Add support for RTEMS 5.1 in the OSAL and provides defines and necessary ifdefs so RTEMS 4.11 can continue to be supported.
- Adds functional test for OS_chmod
Expand All @@ -112,7 +123,7 @@ The autogenerated OSAL user's guide can be viewed at <https://github.com/nasa/cF
- See <https://github.com/nasa/osal/pull/680>


### Development Build: 5.1.0-rc1+dev91
### Development Build: v5.1.0-rc1+dev91

- Rename `UT_SetForceFail` to `UT_SetDefaultReturnValue` since some functions that retain more than 1 value are not necessarily failing
- Add a 5th timer to TimerTest functional to test the one shot (zero-length time interval) case.
Expand All @@ -122,7 +133,7 @@ The autogenerated OSAL user's guide can be viewed at <https://github.com/nasa/cF
- See <https://github.com/nasa/osal/pull/662>


### Development Build: 5.1.0-rc1+dev75
### Development Build: v5.1.0-rc1+dev75

- Ensure that the handle is not NULL before invoking dlclose(). In particular the handle will be NULL for static modules. Shutdown after CTRL+C occurs normally (no segfault).
- Add a "flags" parameter to OS_ModuleLoad() to indicate the desired symbol visibility:
Expand All @@ -131,7 +142,7 @@ The autogenerated OSAL user's guide can be viewed at <https://github.com/nasa/cF
- CFE should use LOCAL flag for apps, and GLOBAL flags for libraries.
- See <https://github.com/nasa/osal/pull/652>

### Development Build: 5.1.0-rc1+dev68
### Development Build: v5.1.0-rc1+dev68

- When `OS_DEBUG` is enabled, this adds a message if mutex give/take actions occur outside the expected sequence. This informs the user (via the debug console) if a lock is taken more than once or if a lock is given by a different task than the one that originally took it:
```
Expand All @@ -143,55 +154,55 @@ OS_MutSemTake():216:WARNING: Task 65547 taking mutex 327685 while owned by task
- UtAssert macros now accept variable string arguments.The `UtAssert_True` wrapper around call is no longer needed to accommodate dynamic string output, thus removing the double assert. UtAssert macros will now be able to offer more information by themselves.
- See <https://github.com/nasa/osal/pull/639>

### Development Build: 5.1.0-rc1+dev60
### Development Build: v5.1.0-rc1+dev60

- Appliy standard formating, whitespace-only changes
- See <https://github.com/nasa/osal/pull/627>

### Development Build: 5.1.0-rc1+dev55
### Development Build: v5.1.0-rc1+dev55

- Deprecate `OS_open` and `OS_creat` to and replaced them with by `OS_OpenCreate`, which implements both functions via flags, and follows the correct OSAL API patterns.
- Change use of uint32 for ID to the correct typedef. Also use ObjectIdFromInteger/ObjectIdToInteger where it is intended to convert these values to integers e.g. for the "name" fields in RTEMS.
- See <https://github.com/nasa/osal/pull/621>

### Development Build: 5.1.0-rc1+dev49
### Development Build: v5.1.0-rc1+dev49

- Adds an event callback mechanism to certain state changes in OSAL. This allows the CFE PSP to be notified at these points, and therefore it can add platform-specific functionality.
- Correct issues involving recent OS_Milli2Ticks change.
- See <https://github.com/nasa/osal/pull/612>

### Development Build: 5.1.0-rc1+dev44
### Development Build: v5.1.0-rc1+dev44

- Removes OS_Tick2Micros and internalize OS_Milli2Ticks.
- Adds ut_assert address equal macro.
- See <https://github.com/nasa/osal/pull/607>

### Development Build: 5.1.0-rc1+dev38
### Development Build: v5.1.0-rc1+dev38

- Sets Revision to 99 for development builds
- See <https://github.com/nasa/osal/pull/600>

### Development Build: 5.1.0-rc1+dev34
### Development Build: v5.1.0-rc1+dev34

- Move this existing function into the public API, as it is performs more verification than the OS_ConvertToArrayIndex function.
- The C library type is signed, and this makes the result check work as intended.
- See <https://github.com/nasa/osal/pull/596>


### Development Build: 5.1.0-rc1+dev16
### Development Build: v5.1.0-rc1+dev16

- In the next major OSAL release, this code will be no longer supported at all. It should be removed early in the cycle to avoid needing to maintain this compatibility code. This code was already conditional on the OSAL_OMIT_DEPRECATED flag and as such the CCB has already tested/verified running the code in this configuration as part of CI scripts. After this change, the build should be equivalent to the result of building with OMIT_DEPRECATED=true.
- See <https://github.com/nasa/osal/pull/582>

### Development Build: 5.1.0-rc1+dev12
### Development Build: v5.1.0-rc1+dev12

- Removes internal functions that are no longer used or defined but whose prototypes and stubs were still present in OS_ObjectIdMap
- Removes repetitive clearing of the global ID and unlocking global table and replaces these with common implementation in the idmap source file. This moves deleting tables to be similar to creating tables and provides
a common location for additional table-deletion-related logic.
- Propagates return code from OS_TaskRegister_Impl(). If this routine fails then return the error to the caller, which also prevents the task from starting.
- See <https://github.com/nasa/osal/pull/576>

### Development Build: 5.1.0-rc1+dev5
### Development Build: v5.1.0-rc1+dev5

- Adds OSAL network APIs missing functional tests as well as tests for OS_TimedRead and OS_TimedWrite
- Allows separate, dynamic registration of test setup and teardown routines which are executed before and after the normal test routine, which can create and delete any global/common test prerequisites.
Expand Down
59 changes: 0 additions & 59 deletions src/os/inc/osapi-file.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,65 +117,6 @@ typedef enum
* @{
*/

#ifndef OSAL_OMIT_DEPRECATED

/*-------------------------------------------------------------------------------------*/
/**
* @brief Creates a file specified by path
*
* Creates a file specified by const char *path, with read/write
* permissions by access. The file is also automatically opened by the
* create call.
*
* @param[in] path File name to create
* @param[in] access Intended access mode - see @ref OSFileAccess
*
* @note Valid handle IDs are never negative. Failure of this
* call can be checked by testing if the result is less than 0.
*
* @return A file handle ID or appropriate error code, see @ref OSReturnCodes
* @retval #OS_INVALID_POINTER if path is NULL
* @retval #OS_FS_ERR_PATH_TOO_LONG if path exceeds the maximum number of chars
* @retval #OS_FS_ERR_PATH_INVALID if path cannot be parsed
* @retval #OS_FS_ERR_NAME_TOO_LONG if the name of the file is too long
* @retval #OS_ERROR if permissions are unknown or OS call fails
* @retval #OS_ERR_NO_FREE_IDS if there are no free file descriptors left
*
* @deprecated Replaced by OS_OpenCreate() with flags set to
* OS_FILE_FLAG_CREATE | OS_FILE_FLAG_TRUNCATE.
*/
int32 OS_creat(const char *path, int32 access);

/*-------------------------------------------------------------------------------------*/
/**
* @brief Opens a file
*
* Opens a file.
*
* @param[in] path File name to create
* @param[in] access Intended access mode - see @ref OSFileAccess
* @param[in] mode The file permissions. This parameter is passed through to the
* native open call, but will be ignored. The file mode (or permissions)
* are ignored by the POSIX open call when the O_CREAT access flag is not passed in.
*
* @note Valid handle IDs are never negative. Failure of this
* call can be checked by testing if the result is less than 0.
*
* @return A file handle ID or appropriate error code, see @ref OSReturnCodes
* @retval #OS_INVALID_POINTER if path is NULL
* @retval #OS_FS_ERR_PATH_TOO_LONG if path exceeds the maximum number of chars
* @retval #OS_FS_ERR_PATH_INVALID if path cannot be parsed
* @retval #OS_FS_ERR_NAME_TOO_LONG if the name of the file is too long
* @retval #OS_ERROR if permissions are unknown or OS call fails
* @retval #OS_ERR_NO_FREE_IDS if there are no free file descriptors left
*
* @deprecated Replaced by OS_OpenCreate() with flags set to
* OS_FILE_FLAG_NONE.
*/
int32 OS_open(const char *path, int32 access, uint32 mode);

#endif

/*-------------------------------------------------------------------------------------*/
/**
* @brief Open or create a file
Expand Down
46 changes: 0 additions & 46 deletions src/os/inc/osapi-filesys.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,52 +188,6 @@ int32 OS_rmfs(const char *devname);
*/
int32 OS_unmount(const char *mountpoint);

#ifndef OSAL_OMIT_DEPRECATED

/*-------------------------------------------------------------------------------------*/
/**
* @brief Obtain number of blocks free
*
* Returns the number of free blocks in a volume
*
* @param[in] name The device/path to operate on
*
* @return Block count or appropriate error code, see @ref OSReturnCodes
* @retval #OS_INVALID_POINTER if name is NULL
* @retval #OS_FS_ERR_PATH_TOO_LONG if the name is too long
* @retval #OS_ERROR if the OS call failed
*
* @deprecated Replaced by OS_FileSysStatVolume() -
* Value can be obtained by reading the "blocks_free" struct member.
*
*/
int32 OS_fsBlocksFree(const char *name);

/*-------------------------------------------------------------------------------------*/
/**
* @brief Obtains the number of free bytes in a volume
*
* Returns the number of free bytes in a volume
*
* @note uses a 64 bit data type to support filesystems that
* are greater than 4 Gigabytes
*
* @param[in] name The device/path to operate on
* @param[out] bytes_free The number of free bytes
*
* @return Execution status, see @ref OSReturnCodes
* @retval #OS_SUCCESS @copybrief OS_SUCCESS
* @retval #OS_INVALID_POINTER if name is NULL
* @retval #OS_FS_ERR_PATH_TOO_LONG if the name is too long
* @retval #OS_ERROR if the OS call failed
*
* @deprecated Replaced by OS_FileSysStatVolume().
* Value can be obtained by multiplying the "blocks_free" by the "block_size" struct members.
*/
int32 OS_fsBytesFree(const char *name, uint64 *bytes_free);

#endif /* OSAL_OMIT_DEPRECATED */

/*-------------------------------------------------------------------------------------*/
/**
* @brief Obtains information about size and free space in a volume
Expand Down
59 changes: 0 additions & 59 deletions src/os/inc/osapi-os-core.h

This file was deleted.

49 changes: 0 additions & 49 deletions src/os/inc/osapi-os-filesys.h

This file was deleted.

Loading