Skip to content

Commit

Permalink
Merge pull request nasa#750 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
osal Integration candidate: 2021-01-12
  • Loading branch information
astrogeco authored Jan 13, 2021
2 parents 81c4fa8 + fa80679 commit bfca5b2
Show file tree
Hide file tree
Showing 72 changed files with 2,471 additions and 1,064 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,32 @@ The autogenerated OSAL user's guide can be viewed at <https://github.com/nasa/cF

## Version History

### Development Build: 5.1.0-rc1+dev184

- Address issues with OSAL global table management:
- use iterators whenever possible
- use an unlock key rather than task ID so OS_TaskExit() doesn't trigger a warning
- general cleanup of lock/unlock impl and remove redundant logic
- unlock global tables during create/delete
- keep threads "attached" in POSIX, so they can be joined when deleted.
- No longer triggers warning with OS_TaskExit() on VxWorks (see #645)
- `OS_TaskDelete()` on POSIX does not return until the task has actually exited (see #642)
- The chmod test is now skipped on VxWorks rather than failing. The `OS_FileChmod_Impl()` function now returns `OS_ERR_NOT_IMPLEMENTED` when run on a file system that does not have permissions, which in turn causes the unit test to be skipped rather than fail.
- Corrects a file handle leak.
- Add parameter check to `OS_SocketSendTo` and adjust coverage test to validate.
- Replace `OS_fsBytesFree` and `OS_fsBlocksFree` with `OS_FileSysStatVolume`. This new API for getting stats on file system. Uses existing `OS_FileSysStatVolume_Impl` call and exposes it in the public API.
- When cleaning up for shutdown, delete resources that have a task/thread first, followed by other resource types. This helps avoid possible dependencies as running threads might be using the other resources. No detectable external impact; internally, the tasks are deleted first during shutdown, which only has an impact if/when tasks are actively using other OSAL resources.
- The mount/unmount *VxWorks* implementation was not adequately checking for and handling the `FS_BASED` pass -through mapping type - which should be mostly a no-op. Create a mount point directory if it does not already exist when using this mapping type for consistency with POSIX.
- Adds a documentation note to `OS_FileSysAddFixedMap()`: The virtual mount point cannot be empty - so `OS_FileSysAddFixedMap(.., "/", "/")` does not work but `OS_FileSysAddFixedMap(.., "/", "/root")` does work and allows one to open files in the root as `"/root/"` from OSAL applications. Mount-point directories do not need to previously exist when using OS_FileSysAddFixedMap
- store `taskTCB` return in a `void *`, then cast to `OS_impl_task_internal_record_t *` to avoid a strict alignment compiler error
- Removes the non-portable `OS_PACK` and `OS_ALIGNED` macros.
- Uses the POSIX dir implementation on VxWorks 6.9. The only incompatibility is the prototype for `mkdir()`which is missing the second argument; this is worked around with a compatibility macro for VxWorks 6.x builds.
- Translate and convert the VxWorks coverage test cases to the portable dir implementation, which benefits VxWorks7, RTEMS, and POSIX.
- Fixes prototypes so they run on RTEMS by replacing uint32 with size_t
- Adds` OS_CHECK_POINTER` macros to `OS_ConvertToArrayIndex` and `OS_TimeBaseGetFreeRun` so they can handle NULL pointers and return the correct error.
- 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

- Document UtAssert_Message parameters, also adds "see also" note for helper macros.
Expand Down
2 changes: 1 addition & 1 deletion src/bsp/pc-rtems/src/bsp_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
OS_BSP_ConsoleOutput_Impl
See full description in header
------------------------------------------------------------------*/
void OS_BSP_ConsoleOutput_Impl(const char *Str, uint32 DataLen)
void OS_BSP_ConsoleOutput_Impl(const char *Str, size_t DataLen)
{
/* writes the raw data directly to STDOUT_FILENO (unbuffered) */
write(STDOUT_FILENO, Str, DataLen);
Expand Down
7 changes: 1 addition & 6 deletions src/os/inc/common_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,18 @@ extern "C"
** Define compiler specific macros
** The __extension__ compiler pragma is required
** for the uint64 type using GCC with the ANSI C90 standard.
** Other macros can go in here as needed, for example alignment
** pragmas.
** Other macros can go in here as needed.
**
** NOTE: The white-box (coverage) unit testing may need to disable
** these extra attributes. These test builds define the OSAPI_NO_SPECIAL_ATTRIBS
** macro to disable this.
*/
#if defined(__GNUC__) && !defined(OSAPI_NO_SPECIAL_ATTRIBS)
#define _EXTENSION_ __extension__
#define OS_PACK __attribute__((packed))
#define OS_ALIGN(n) __attribute__((aligned(n)))
#define OS_USED __attribute__((used))
#define OS_PRINTF(n, m) __attribute__((format(printf, n, m)))
#else
#define _EXTENSION_
#define OS_PACK
#define OS_ALIGN(n)
#define OS_USED
#define OS_PRINTF(n, m)
#endif
Expand Down
Loading

0 comments on commit bfca5b2

Please sign in to comment.