Skip to content

Commit

Permalink
Code review: Fix typos and spelling mistakes accross all the files of…
Browse files Browse the repository at this point in the history
… the project.
  • Loading branch information
randruc committed Nov 6, 2020
1 parent 11faf99 commit 7925af1
Show file tree
Hide file tree
Showing 30 changed files with 54 additions and 53 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ target_link_options(
PUBLIC ${LAZULI_USER_LINK_FLAGS})

# Generate disassembly listing.
set(LST_TARGET_NAME lst_ouput)
set(LST_TARGET_NAME lst_output)

add_custom_command(
OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# This Dockerfile describes the container image that is used as the development
# environment for Lazuli. This image is used by kernel and user application
# developpers, as well as for continuous integration.
# developers, as well as for continuous integration.
#
# Man pages are first built in an intermediate image. This has the advantage of
# being platform-independent. The man pages are then copied into the final
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ https://lazuli.readthedocs.io/en/latest/developing_your_project.html

## Uploading binaries to the target platform

On AVR MCUs, `avrdude` can be used to uplaod the final binary to the target
On AVR MCUs, `avrdude` can be used to upload the final binary to the target
machine.
The script [scripts/AVR/upload.sh](scripts/AVR/upload.sh) can be used for that.
It takes the HEX file as a parameter.
Expand Down
4 changes: 2 additions & 2 deletions TODO.org
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
* Think about defining the execution of the main() function in the idle task.
** i.e. Execution begins as the idle task, and user tasks are created from the idle task.
** This allows/ease the implementation of Pthread API.
** Carrefully think about priorities.
** Carefully think about priorities.
* For PROGMEM, implement "memcpy_P": Memory_CopyFromProgmem
* Test command "apropos" in man pages of the Docker image.
* In the Docker image, make sure to respect the File Hierarchy Standard
Expand All @@ -66,5 +66,5 @@
* Think about renaming the GitHub repository to "LazuliRTOS".
* Host the Lazuli docker image to GitHub instead of docker.io.
* Think about moving libc header files to the directory include/
** See if we can also get rid of directory libc/, as the corresponding functionnalities are actually implemented as kernel modules
** See if we can also get rid of directory libc/, as the corresponding functionalities are actually implemented as kernel modules
* See if it would be necessary to declare all global variables used the scheduler.c and kernel.c as 'volatile'.
2 changes: 1 addition & 1 deletion doc/a_simple_example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
A simple example
================

Instead of the traditionnal "Hello world", we show here a simple clock
Instead of the traditional "Hello world", we show here a simple clock
application.

This application demonstrates a simple clock that prints the time every second
Expand Down
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ provided by Lazuli.
The last chapter of this documentation is the **Kernel** documentation.
It is intended for programmers, who wish to code in the Lazuli kernel, hacking
and improving it.
This documentation will give you detailled information about the inner working
This documentation will give you detailed information about the inner working
of Lazuli.

.. toctree::
Expand Down
2 changes: 1 addition & 1 deletion doc/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Introduction

Lazuli is a preemptive real-time multitasking kernel targeting microcontrollers,
or machines with constrained resources. It allow the microcontroller to run
multiple independant tasks simultaneously, with some of them having hard
multiple independent tasks simultaneously, with some of them having hard
real-time constraints.
Lazuli provides a "time slice" scheduler in order to respect deadlines
constraints of the tasks running in the system.
Expand Down
4 changes: 2 additions & 2 deletions doc/kernel/about_documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The documentation is rendered in 2 formats:
* **man**: The man page output is used in the Lazuli Docker image.
Any developer using the development environment Docker image can type
``man Lazuli`` to read the exact complete documentation you are now reading.
Thenks to Doxygen, the user can also use ``man`` to obtain the documentation
Thanks to Doxygen, the user can also use ``man`` to obtain the documentation
about any function or symbol used in the project.

Sphinx and reStructuredText
Expand Down Expand Up @@ -90,7 +90,7 @@ The API documentation for the project is hosted at
Code comments
^^^^^^^^^^^^^

All C code of the project is documentated using Doxygen code comments.
All C code of the project is documented using Doxygen code comments.
The absence of Doxygen code comments will cause an error during build.

Building Doxygen documentation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ constants under a common name:

Most of the time and for the vast majority of usual C code, this practice should
be applied.
Enumerations also have the advantage of beeing true C symbols from the compiler
Enumerations also have the advantage of being true C symbols from the compiler
and debugger point of view.

However, there are a few situations where manipulating integer constants as
enumerations should not be considered, or at least should be taken really
carrefully.
carefully.
These situations happen when enumerations are manipulated as l-values on
specific architectures.

Expand All @@ -55,7 +55,7 @@ A consequence on binary interfacing
-----------------------------------

The first consequence of the C specification is that ``enum`` constants don't
have a fixed size accross different architectures, as the size of an ``int``
have a fixed size across different architectures, as the size of an ``int``
varies between architectures/compilers.
This is quite a well-know fact amongst C programmers.

Expand All @@ -67,8 +67,8 @@ An argument against *specific* uses of enumerations
---------------------------------------------------

Let's now introduce a sneaky pitfall, that happens *under specific conditions*.
Lazuli RTOS is targetting embedded systems. It is written in ANSI C and aims to
be easily portable accross different architectures.
Lazuli RTOS is targeting embedded systems. It is written in ANSI C and aims to
be easily portable across different architectures.

We take here the example of the AVR architecture, which is a target for the
Lazuli RTOS.
Expand All @@ -90,7 +90,7 @@ are often dealing with tiny machines.
It is much more difficult to see these problems and their consequences when
using enumerations rather than integers, because we often rely on standard
header ``<stdint.h>`` when declaring integer variables. We then have a
convinient way to master the size of integer variables right from their
convenient way to master the size of integer variables right from their
declaration.
Unfortunately no equivalent exists for enumerations, and its not easy to spot
their size at a glance when reviewing the source code.
Expand Down
6 changes: 3 additions & 3 deletions doc/kernel/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ The expected format for commit messages is the following:
<Part or module>: <Brief explanation on one line.>
<Detailled explanation if needed.>
<The detailled explanation can be expressed as a list.>
<Detailed explanation if needed.>
<The detailed explanation can be expressed as a list.>
Here are a few examples of real commit messages that follow this format:

Expand Down Expand Up @@ -99,7 +99,7 @@ using GitHub Actions, and is triggered on pull-requests.

The project's CI performs the following tasks:

* Execute ``scripts/checklines.sh`` to check for trailing whistespaces, line
* Execute ``scripts/checklines.sh`` to check for trailing whitespaces, line
length, etc.
* Build the Lazuli development environment Docker image from the root
``Dockerfile``.
Expand Down
4 changes: 2 additions & 2 deletions doc/kernel/repository_tree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Repository tree
===============

We give here an explanation of the main directorites of the repository.
We give here an explanation of the main directories of the repository.
It is displayed here from the root with the command ``tree -d`` with manual
modifications to show only the most important ones.
Comments on the right side have been added manually.
Expand All @@ -31,7 +31,7 @@ Comments on the right side have been added manually.
│   │   ├── arch Base directory of arch-specific kernel sources
│   │   └── modules Base directory of kernel modules sources
│   ├── libc Base directory of C files related to libc implementation
│   ├── libc-headers Base direcotry of standard C library header files
│   ├── libc-headers Base directory of standard C library header files
│   │   └── arch-dependent Base directory of arch-dependent libc header files
│   └── unit-tests Unit tests sources
├── templates File templates, used when creating new files
Expand Down
4 changes: 2 additions & 2 deletions doc/kernel/startup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Assembly - Setting up a C runtime

System startup is divided in 2 parts:

* The first part, written in assembly language, exectutes right after powering
on the system, and has the responsability to set up an operational C runtime.
* The first part, written in assembly language, executes right after powering
on the system, and has the responsibility to set up an operational C runtime.
* The second part, mainly written in C, performs various operations that are
necessary to initialize the data structures of the kernel, before giving hand
to user code.
Expand Down
2 changes: 1 addition & 1 deletion example-programs/clock24.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ main(void)
Lz_SerialConfiguration serialConfiguration;

/*
* Enable serial tansmission.
* Enable serial transmission.
*/
Lz_Serial_GetConfiguration(&serialConfiguration);
serialConfiguration.enableFlags = LZ_SERIAL_ENABLE_TRANSMIT;
Expand Down
2 changes: 1 addition & 1 deletion sys/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ target_compile_options(
${KERNEL_LIBRARY_NAME}
PRIVATE ${LZ_KERNEL_COMPILE_FLAGS})

set(KERNEL_LST_TARGET_NAME kernel_lst_ouput)
set(KERNEL_LST_TARGET_NAME kernel_lst_output)

add_custom_command(
OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion sys/cmake/avr.toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_PROCESSOR avr)

set(CMAKE_C_COMPILER ${AVR_CC} CACHE FILEPATH "AVR toolchain C compiler.")
set(CMAKE_ASM_COMPILER ${AVR_CC} CACHE FILEPATH "AVR toolchain assmebler.")
set(CMAKE_ASM_COMPILER ${AVR_CC} CACHE FILEPATH "AVR toolchain assembler.")
set(CMAKE_AR ${AVR_AR} CACHE FILEPATH "AVR toolchain static library archiver.")
set(CMAKE_LINKER ${AVR_LD} CACHE FILEPATH "AVR toolchain linker.")
set(CMAKE_NM ${AVR_NM} CACHE FILEPATH "AVR toolchain nm tool.")
Expand Down
2 changes: 1 addition & 1 deletion sys/cmake/declare_lazuli_module.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# The macro then adds the declared module in the global list of declared modules.
#
# @param NAME The module name, in lowercase, without prefixing it by "module_".
# @param SUMMARY A string describing the module functionnality.
# @param SUMMARY A string describing the module functionality.
# @param SOURCES A list of the module source files.
#
macro(declare_lazuli_module)
Expand Down
2 changes: 1 addition & 1 deletion sys/doxygen_main_page.dox
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @endcode
*
* All user API types conform to the following naming convention:
* <b>`Lz_XXXXX`</b> where <b>`XXXXX`</b> represents a type writtent in camel
* <b>`Lz_XXXXX`</b> where <b>`XXXXX`</b> represents a type written in camel
* case. Some examples:
* @code{.c}
* Lz_Mutex
Expand Down
4 changes: 2 additions & 2 deletions sys/include/Lazuli/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#endif /* __cplusplus */

/**
* Tell the compiler that the variable X is left unsed.
* Tell the compiler that the variable X is left unused.
*
* @param X The unused variable.
*/
Expand Down Expand Up @@ -165,7 +165,7 @@ STATIC_ASSERT(sizeof(uint8_t) == 1,
* @param X An unsigned integer constant representing the position of the bit,
* starting from index 0.
*
* @warning The constant must be specified using an unsigned integer litteral
* @warning The constant must be specified using an unsigned integer literal
* in uppercase.
* e.g. POSITION(2U)
* This is to make static analyzers not complain about using a shift
Expand Down
2 changes: 1 addition & 1 deletion sys/include/Lazuli/config_static_analysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* The reason for that is that most static code analysis tools operate on
* preprocessed files. By using this file instead of the final config.h, we
* simulate the fact that these configuration constants can take any value.
* So static analysizers don't complain/exclude/assume some parts of source
* So static analysers don't complain/exclude/assume some parts of source
* code.
*
* @warning Some of these definitions can cause problems as there are some
Expand Down
6 changes: 3 additions & 3 deletions sys/include/Lazuli/lazuli.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ typedef struct {
/**
* Register a new task.
*
* If an error occured during registration of the task _false_ is returned and
* If an error occurred during registration of the task _false_ is returned and
* the task is not included in the set of tasks that will be run.
*
* @param taskEntryPoint The entry point of the task to register.
Expand All @@ -140,7 +140,7 @@ typedef struct {
*
* @return
* - _true_ if the task has been registered without error.
* - _false_ if an error occured during registration.
* - _false_ if an error occurred during registration.
*/
bool
Lz_RegisterTask(void (* const taskEntryPoint)(void),
Expand Down Expand Up @@ -202,7 +202,7 @@ Lz_Task_Terminate(void);

/**
* Set the calling task to wait for its next activation.
* May be used if the task finnished its work without consuming all of its
* May be used if the task finished its work without consuming all of its
* completion time.
*
* @attention Only tasks with scheduling policy CYCLIC_RT can wait for next
Expand Down
4 changes: 2 additions & 2 deletions sys/include/Lazuli/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ List_IsEmpty(const Lz_LinkedList * const linkedList);
* @param LINKEDLIST A pointer to the Lz_LinkedList to run through.
* @param TYPE The real type of the list elements
* @param ITEM A pointer to a struct of type @p TYPE containing the
* Lz_LinkedListELement.
* Lz_LinkedListElement.
* This pointer will point to the current item of each loop turn.
* This pointer will never be _NULL_ while the loop is running.
* @param MEMBER The name of the member in @p TYPE which bears the
Expand Down Expand Up @@ -209,7 +209,7 @@ List_IsEmpty(const Lz_LinkedList * const linkedList);
* @param LINKEDLIST A pointer to the Lz_LinkedList to run through.
* @param TYPE The real type of the list elements
* @param ITEM A pointer to a struct of type @p TYPE containing the
* Lz_LinkedListELement.
* Lz_LinkedListElement.
* This pointer will point to the current item of each loop turn.
* This pointer will never be _NULL_ while the loop is running.
* @param MEMBER The name of the member in @p TYPE which bears the
Expand Down
2 changes: 1 addition & 1 deletion sys/include/Lazuli/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* This file describes the interface of serial port configuration.
* Serial port means here UART/USART device.
*
* The configuration is the same for input (Receive/Rx) and ouput
* The configuration is the same for input (Receive/Rx) and output
* (Transmit/Tx).
*/

Expand Down
9 changes: 5 additions & 4 deletions sys/include/Lazuli/sys/arch/arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Provides a simple abstraction API to architecture specific functions.
* This is the API that must be re-implemented if porting to another platform.
*
* This one is taylored after the AVR platform and can be subject to change if
* This one is tailored after the AVR platform and can be subject to change if
* porting to another platform.
*/

Expand Down Expand Up @@ -243,10 +243,11 @@ void
Arch_GetSerialConfiguration(Lz_SerialConfiguration * const configuration);

/**
* Configure the seria line according to the parameter.
* Configure the serial line according to the parameter.
*
* @param configuration A pointer to an existing Lz_SerialConfiguration containg
* the full configuration to set up the serial line.
* @param configuration A pointer to an existing Lz_SerialConfiguration
* containing the full configuration to set up the serial
* line.
*/
void
Arch_SetSerialConfiguration(const Lz_SerialConfiguration * const configuration);
Expand Down
4 changes: 2 additions & 2 deletions sys/include/Lazuli/sys/scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void
Scheduler_Init(void);

/**
* Call the appropriate scheduler to abort the curent running task.
* Call the appropriate scheduler to abort the current running task.
*
* @param sp The stack pointer of the running task after saving its context.
*/
Expand All @@ -64,7 +64,7 @@ void
Scheduler_HandleInterrupt(const uint8_t interruptCode);

/**
* This function is called when a clock tick occured, catch by the interrupt
* This function is called when a clock tick occurred, catch by the interrupt
* handler.
*
* @param sp The stack pointer of the current running task after saving its
Expand Down
6 changes: 3 additions & 3 deletions sys/include/Lazuli/sys/task.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ typedef u_read_write_atomic_t lz_task_to_scheduler_message_t;

/**
* Set the task to wait for its next activation.
* i.e. It finnished its work without consuming all of its completion time.
* i.e. It finished its work without consuming all of its completion time.
*/
#define WAIT_ACTIVATION ((lz_task_to_scheduler_message_t)1U)

Expand Down Expand Up @@ -182,7 +182,7 @@ typedef struct {
}Task;

/**
* This type definition is needed to exlude confusion with the 'volatile'
* This type definition is needed to exclude confusion with the 'volatile'
* type qualifier used in the struct declaration below.
*/
typedef void (*FuncVoidVoid)(void);
Expand Down Expand Up @@ -315,7 +315,7 @@ typedef struct {
/**
* Abort the calling task.
*
* This function can be called when some unrecoverable error occured in the
* This function can be called when some unrecoverable error occurred in the
* context of a task (e.g. when a mandatory pointer is _NULL_ as a function
* parameter).
* This will have the consequence of saving the task context (saving all
Expand Down
2 changes: 1 addition & 1 deletion sys/kern/arch/AVR/avr_arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @brief Header file specific to the AVR arch module.
* @copyright 2018-2020, Remi Andruccioli <remi.andruccioli@gmail.com>
*
* This header file declares all symbol neeed specifically in the AVR arch
* This header file declares all symbol needed specifically in the AVR arch
* module, and not declared in <Lazuli/sys/arch/arch.h>.
*/

Expand Down
2 changes: 1 addition & 1 deletion sys/kern/modules/clock_24/clock_24.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Clock24_Increment(void)
/*
* The clock version integer will constantly increment from 0 to its maximum
* value.
* We can let it overflow as it is unsigned. Unsiged overflow is not an
* We can let it overflow as it is unsigned. Unsigned overflow is not an
* undefined behaviour in C89.
*/
++clockVersion;
Expand Down

0 comments on commit 7925af1

Please sign in to comment.