Skip to content

Commit 2a2defb

Browse files
committed
Merge pull request #1137 from thnkslprpt/FIX-OSAL-TYPOS
Fix #1147, Correct typos in documentation, print statements, and comments Part of nasa/cFS#352
2 parents 50f6dd5 + 99b3047 commit 2a2defb

81 files changed

Lines changed: 156 additions & 156 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.

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ project(OSAL C)
4848
# part of the open source release.
4949
# CAUTION: The API between the OSAL and the low level implementation and/or BSP
5050
# is not stabilized, and may change with every OSAL release. No attempt is made
51-
# to provide backward compatibility with to external sources.
51+
# to provide backward compatibility with external sources.
5252
set(OSAL_EXT_SOURCE_DIR "$ENV{OSAL_EXT_SOURCE_DIR}"
5353
CACHE PATH "External source directory to check for additional OS/BSP implementations")
5454

@@ -106,7 +106,7 @@ add_subdirectory(ut_assert)
106106

107107

108108
# OSAL_SYSTEM_BSPTYPE indicate which of the BSP packages
109-
# to build. These is required and must be defined. Confirm that this exists
109+
# to build. This is required and must be defined. Confirm that this exists
110110
# and error out now if it does not.
111111
if (NOT DEFINED OSAL_SYSTEM_BSPTYPE)
112112
message(FATAL_ERROR "OSAL_SYSTEM_BSPTYPE must be set to the appropriate BSP")

Makefile.sample

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ $(FILETGTS):
8383
$(MAKE) -C $(O) $(@)
8484
endif
8585

86-
# The "prep" step requires extra options that are specified via enviroment variables.
86+
# The "prep" step requires extra options that are specified via environment variables.
8787
# Certain special ones should be passed via cache (-D) options to CMake.
8888
# These are only needed for the "prep" target but they are computed globally anyway.
8989
#
90-
# Note this simple makefile just builds for one target, could trivally manage
90+
# Note this simple makefile just builds for one target, could trivially manage
9191
# multiple targets by changing build directory. More complex target
92-
# list examples are provide by cFE..
92+
# list examples are provided by cFE.
9393
PREP_OPTS := -DOSAL_SYSTEM_BSPTYPE=$(BSPTYPE) -DINSTALL_TARGET_LIST=.
9494

9595
ifneq ($(INSTALLPREFIX),)

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
This repository contains NASA's Operating System Abstraction Layer (OSAL), which is a framework component of the Core Flight System.
77

8-
This is a collection of abstractio APIs and associated framework to be located in the `osal` subdirectory of a cFS Mission Tree. The Core Flight System is bundled at <https://github.com/nasa/cFS>, which includes build and execution instructions.
8+
This is a collection of abstraction APIs and associated framework to be located in the `osal` subdirectory of a cFS Mission Tree. The Core Flight System is bundled at <https://github.com/nasa/cFS>, which includes build and execution instructions.
99

1010
The autogenerated OSAL user's guide can be viewed at <https://github.com/nasa/cFS/blob/gh-pages/OSAL_Users_Guide.pdf>.
1111

@@ -144,14 +144,14 @@ See <https://github.com/nasa/osal/pull/1050> and <https://github.com/nasa/cFS/pu
144144

145145
### Development Build: v5.1.0-rc1+dev417
146146

147-
- Fixes infinite loop in `UtPrintx()`. Adds the data's memory address to output. Note, UtPrintf displays the the file/line of the `UtPrintx` function, **not the actual test location**; it is better to call `UT_BSP_DoText` directly.
147+
- Fixes infinite loop in `UtPrintx()`. Adds the data's memory address to output. Note, UtPrintf displays the file/line of the `UtPrintx` function, **not the actual test location**; it is better to call `UT_BSP_DoText` directly.
148148
- Adds `OS_SocketShutdown()` API wrapper around BSD's socket shutdown() API. This allows a data transfer of a stream socket to be gracefully shut down prior to socket closure.
149149
- See osal <https://github.com/nasa/osal/pull/979> and <https://github.com/nasa/cFS/pull/252>
150150

151151
### Development Build: v5.1.0-rc1+dev411
152152

153-
- [docs] Clarifies that that zero will be returned on EOF condition in the API documentation for OS_read/write/TimedRead/TimedWrite. In the case of the timed API calls, the `OS_ERR_TIMEOUT` status code will be returned if the timeout expired without the handle becoming readable/writable during that time.
154-
- Addresses a shortcomings in the UT Assert hook functions. Namely the assumed return type of int32 which is not always the case.
153+
- [docs] Clarifies that zero will be returned on EOF condition in the API documentation for OS_read/write/TimedRead/TimedWrite. In the case of the timed API calls, the `OS_ERR_TIMEOUT` status code will be returned if the timeout expired without the handle becoming readable/writable during that time.
154+
- Addresses shortcomings in the UT Assert hook functions. Namely the assumed return type of int32 which is not always the case.
155155
- Adds the concept of a "handler" function to UT assert to replace hard-coded custom logic in UT assert. A handler is the custom logic that exists between the hook function and the return to the stub caller. The handler is directly responsible for setting all outputs.
156156
- Adds a script to auto-generate stub functions that match this pattern. Given an API header file, the script extracts
157157
the declarations, and generates a source file with stub definitions that rely on a separate handler to deal with the needed outputs.
@@ -166,7 +166,7 @@ the declarations, and generates a source file with stub definitions that rely on
166166
### Development Build: v5.1.0-rc1+dev393
167167

168168
- Changes parameter names to avoid collisions. Renames `access` as `access_mode` in `osapi-file.h`. Renames `time` as `TimeSp` in `os-impl-posix-gettime.c`.
169-
- Deletes the broken RTEMS `os-impl-shell.c` file so so OSAL builds with `OSAL_CONFIG_INCLUDE_SHELL=true`. RTEMS will always report `OS_ERR_NOT_IMPLEMENTED`.
169+
- Deletes the broken RTEMS `os-impl-shell.c` file so OSAL builds with `OSAL_CONFIG_INCLUDE_SHELL=true`. RTEMS will always report `OS_ERR_NOT_IMPLEMENTED`.
170170
- See <https://github.com/nasa/osal/pull/967> and <https://github.com/nasa/cFS/pull/248>
171171

172172
### Development Build: v5.1.0-rc1+dev387
@@ -182,7 +182,7 @@ the declarations, and generates a source file with stub definitions that rely on
182182
### Development Build: v5.1.0-rc1+dev378
183183

184184
- Replaces nonstandard header file block comments and include guards. No behavior changes
185-
- Removes `CLOCK_MONOTONIC` as the osal colck source since PSP no longer needs it. `OS_GetLocalTime()` and `OS_SetLocalTime()` will work as described.
185+
- Removes `CLOCK_MONOTONIC` as the osal clock source since PSP no longer needs it. `OS_GetLocalTime()` and `OS_SetLocalTime()` will work as described.
186186
- Replaces `shellName` with a specific `localShellName` that can be polled safely and changes its type to a char of `OS_MAX_API_NAME` length for safety.
187187
- See <https://github.com/nasa/osal/pull/951> and <https://github.com/nasa/cFS/pull/238>
188188

@@ -192,7 +192,7 @@ the declarations, and generates a source file with stub definitions that rely on
192192
- Applies minor code and documentation cleanup: white space, typos, etc.
193193
- Adds test to get full coverage of vxworks in `os-impl-bsd-socket.c` resulting in full line coverage for OSAL
194194
- Adds more descriptive return codes if `OS_SymbolTableDump_Impl` does not do what is expected. Adds a new error `OS_ERR_OUTPUT_TOO_LARGE` if the size limit was insufficient. Return `OS_ERROR` if an empty file was written - this likely indicates some fundamental issue with the VxWorks symbol table. Returns `OS_ERR_NAME_TOO_LONG` if one of the symbol names was too long. Improves unit test to check for/verify these responses.
195-
- Removes the unneeded `OS_TaskRegister()` and all references to it in code, tests, and documentation. No impact to behavior, but does affect API and has depenedencies
195+
- Removes the unneeded `OS_TaskRegister()` and all references to it in code, tests, and documentation. No impact to behavior, but does affect API and has dependencies
196196
- Removes unused `-SCRIPT_MODE` flag in cmake
197197
- Remove comparison between `osal_id_t` and `integers` to use the provided comparison function, `OS_ObjectIdDefined()`. System builds and runs again when using a type-safe/non-integer osal_id_t type.
198198
- See <https://github.com/nasa/osal/pull/927>
@@ -389,7 +389,7 @@ OS_MutSemTake():216:WARNING: Task 65547 taking mutex 327685 while owned by task
389389

390390
### Development Build: v5.1.0-rc1+dev60
391391

392-
- Appliy standard formating, whitespace-only changes
392+
- Apply standard formatting, whitespace-only changes
393393
- See <https://github.com/nasa/osal/pull/627>
394394

395395
### Development Build: v5.1.0-rc1+dev55
@@ -417,7 +417,7 @@ OS_MutSemTake():216:WARNING: Task 65547 taking mutex 327685 while owned by task
417417

418418
### Development Build: v5.1.0-rc1+dev34
419419

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

@@ -463,7 +463,7 @@ a common location for additional table-deletion-related logic.
463463
- No impact to current unit testing which runs UT assert as a standalone app. Add a position independent code (PIC) variant of the ut_assert library, which can be dynamically loaded into other applications rather than running as a standalone OSAL application. This enables loading
464464
UT assert as a CFE library.
465465
- Unit tests pass on RTEMS.
466-
- Resolve inconsistency in how the stack size is treated across different OS implemntations. With this change the user-requested size is passed through to the underlying OS without an enforced minimum. An additional sanity check is added at the shared layer to ensure that the stack size is never passed as 0.
466+
- Resolve inconsistency in how the stack size is treated across different OS implementations. With this change the user-requested size is passed through to the underlying OS without an enforced minimum. An additional sanity check is added at the shared layer to ensure that the stack size is never passed as 0.
467467
- Update Licenses for Apache 2.0
468468
- See <https://github.com/nasa/osal/pull/521>
469469

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ To report a vulnerability for the OSAL subsystem please [submit an issue](https:
66

77
For general cFS vulnerabilities please [open a cFS framework issue](https://github.com/nasa/cfs/issues/new/choose) and see our [top-level security policy](https://github.com/nasa/cFS/security/policy) for additional information.
88

9-
In either case please use the "Bug Report" template and provide as much information as possible. Apply appropraite labels for each report. For security related reports, tag the issue with the "security" label.
9+
In either case please use the "Bug Report" template and provide as much information as possible. Apply appropriate labels for each report. For security related reports, tag the issue with the "security" label.
1010

1111
## Testing
1212

default_config.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# either in the OSAL or the application which invoked OSAL.
3131
#
3232
# If set FALSE (default), then the OSAL bugcheck macro will evaluate its
33-
# boolean conditional and generate an action if that conditional evaulates
33+
# boolean conditional and generate an action if that conditional evaluates
3434
# false. (The specific action to take is configured via a different
3535
# directive -- see OSAL_CONFIG_BUGCHECK_STRICT).
3636
#
@@ -73,7 +73,7 @@ set(OSAL_CONFIG_BUGCHECK_STRICT FALSE)
7373
#
7474
# Whether to include the Network API
7575
#
76-
# If set TRUE, the the socket abstraction (if applicable on the platform)
76+
# If set TRUE, the socket abstraction (if applicable on the platform)
7777
# will be included. If set FALSE, then all calls to the network API will
7878
# return OS_ERR_NOT_IMPLEMENTED.
7979
#
@@ -276,12 +276,12 @@ set(OSAL_CONFIG_MAX_FILE_NAME 20
276276
CACHE STRING "Maximum Length of file names"
277277
)
278278

279-
# Maximum length for an virtual path name (virtual directory + file)
279+
# Maximum length for a virtual path name (virtual directory + file)
280280
set(OSAL_CONFIG_MAX_PATH_LEN 64
281281
CACHE STRING "Maximum Length of path names"
282282
)
283283

284-
# Maximum length allowed for a object (task,queue....) name
284+
# Maximum length allowed for an object (task,queue....) name
285285
set(OSAL_CONFIG_MAX_API_NAME 20
286286
CACHE STRING "Maximum Length of resource names"
287287
)

docs/OSAL-Configuration-Guide.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ The following sections provide instructions on how to:
7676

7777
- Configure the build directory for an OSAL application
7878

79-
- Configure a OSAL Application
79+
- Configure an OSAL Application
8080

8181
- Build the OSAL Application
8282

@@ -135,7 +135,7 @@ Most parameters set upper bounds on the number of OS objects that can be created
135135
the OSAL keeps track of allocated OS objects using fixed size tables.
136136

137137
If customization is desired, one should not modify the `default_config.cmake` file directly,
138-
but rather provide a alternative values by one of the override methods:
138+
but rather provide alternative values by one of the override methods:
139139

140140
- If configuring OSAL as a standalone build for testing, values for options can be
141141
specified as `-D` options on the cmake command. This is a common method of specifying
@@ -486,13 +486,13 @@ software to remain portable.
486486
There are a few ways to map these host file systems to OSAL file
487487
systems:
488488

489-
- **Map existing target file systems to a OSAL path**. This is one of
489+
- **Map existing target file systems to an OSAL path**. This is one of
490490
the most common ways to map the Non-Volatile disk to the OSAL. The OSAL
491491
relies on the target OS to create/mount a file system and it simply is
492492
given a mapping to the disk to allow the OSAL to access it.
493493

494494
- **Create EEPROM/Flash/ATA File systems**. The OSAL has the ability
495-
on some targets to format or initialize a EEPROM or ATA disk device.
495+
on some targets to format or initialize an EEPROM or ATA disk device.
496496
This is less commonly used.
497497

498498
- **Create RAM File Systems**. The OSAL can create RAM disks on the
@@ -510,7 +510,7 @@ mappings via API calls during its startup. This may be done any time after call
510510
`OS_API_Init()`.
511511

512512
For example, for Core Flight System (cFS) configurations that require persistent
513-
storage to be provided under a virual directory called `/cf`, the platform-specific
513+
storage to be provided under a virtual directory called `/cf`, the platform-specific
514514
CFE PSP layer configures the mapping in an appropriate manner by calling
515515
the `OS_FileSysAddFixedMap()` API during its OS_Application_Startup() implementation.
516516

@@ -633,14 +633,14 @@ qemu-system-i386 -m 128 -no-reboot -display none -serial stdio \
633633
```
634634

635635
Where `<image>.exe` refers to any of the test programs or applications
636-
that are provided with OSAL. This command puts the virual console on
636+
that are provided with OSAL. This command puts the virtual console on
637637
the same terminal where the QEMU emulator is started. The program
638638
should run automatically after the kernel boots. The system may be
639639
stopped by issuing the "shutdown" command at the shell, or by pressing
640640
the CTRL+A followed by CTRL+C which terminates QEMU.
641641

642642

643-
## Generc Linux Platform
643+
## Generic Linux Platform
644644

645645
The OSAL can run on many Linux distributions. Testing is done with currently
646646
supported Ubuntu LTS versions (up through 20.04 at the time of the current
@@ -690,7 +690,7 @@ each OSAL subsystem is specially compiled with special flags to enable
690690
profiling (to track line and branch coverage) and linked with _stub_
691691
implementations of all other dependencies. This way, test cases can
692692
trigger error paths from library calls that would otherwise not be possible
693-
in a black box test enviornment.
693+
in a black box test environment.
694694

695695
These test programs are executed just as any other application program.
696696

@@ -720,7 +720,7 @@ the test programs will be copied to the output location/staging area.
720720
### Option 1: Execute single test directly from a build tree
721721

722722
The tests can be executed directly in-place in the build directory. This method often useful
723-
when debugging, as the exectuable can also be run in a debugger (i.e. gdb) this way.
723+
when debugging, as the executable can also be run in a debugger (i.e. gdb) this way.
724724

725725
The following example executes the task subsystem coverage test for the shared layer, but any
726726
other test can be run in a similar fashion.

docs/src/osal_fs.dox

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ instance, the path of the file that the file descriptor points to can be easily
7474
to determine statistics for a task, or the entire system. This information can all
7575
be retrieved with a single API, OS_FDGetInfo.
7676

77-
All of possible file system calls are not implemented. "Special" files requiring OS
78-
specific control/operations are by nature not portable. Abstraction in this case is
77+
All of the possible file system calls are not implemented. "Special" files requiring
78+
OS specific control/operations are by nature not portable. Abstraction in this case
7979
is not possible, so the raw OS calls should be used (including open/close/etc). Mixing
8080
with OSAL calls is not supported for such cases. #OS_TranslatePath is available to
8181
support using open directly by an app and maintain abstraction on the file system.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ void OS_BSP_Unlock_Impl(void)
136136
}
137137
else
138138
{
139-
/* Restore previous cancelability state */
139+
/* Restore previous cancellability state */
140140
pthread_setcancelstate(OS_BSP_GenericLinuxGlobal.AccessCancelState, NULL);
141141
}
142142
}
@@ -212,7 +212,7 @@ int main(int argc, char *argv[])
212212
* Note that the first argument (0) is the command name. The
213213
* first "real" argument is at position 1.
214214
*
215-
* However this still needs to pass it through as the appliction
215+
* However this still needs to pass it through as the application
216216
* might still want to use library "getopt" and this expects the
217217
* first parameter to be this way.
218218
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ int OS_BSPMain(void)
108108

109109
if (OS_BSP_GenericVxWorksGlobal.AccessMutex == (SEM_ID)0)
110110
{
111-
BSP_DEBUG("semMInitalize: errno=%d\n", errno);
111+
BSP_DEBUG("semMInitialize: errno=%d\n", errno);
112112
}
113113

114114
/*

src/bsp/pc-rtems/src/bsp_start.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void OS_BSP_Setup(void)
101101
* Known arguments are handled here, and unknown args are
102102
* saved for the UT application.
103103
*
104-
* Batch mode is intended for non-interative execution.
104+
* Batch mode is intended for non-interactive execution.
105105
*
106106
* It does two things:
107107
* - do not start the shell task
@@ -385,7 +385,7 @@ rtems_task Init(rtems_task_argument ignored)
385385
/* configuration information */
386386

387387
/*
388-
** RTEMS OS Configuration defintions
388+
** RTEMS OS Configuration definitions
389389
*/
390390
#define TASK_INTLEVEL 0
391391
#define CONFIGURE_INIT

0 commit comments

Comments
 (0)