From da2065c41e7fc65765de00542006832077c67068 Mon Sep 17 00:00:00 2001 From: Aiken Harris Date: Fri, 19 Jul 2024 13:45:33 +0200 Subject: [PATCH 1/3] Correct URL to favicon --- themes/exectos/layouts/partials/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/exectos/layouts/partials/head.html b/themes/exectos/layouts/partials/head.html index a77ec8f..e303104 100644 --- a/themes/exectos/layouts/partials/head.html +++ b/themes/exectos/layouts/partials/head.html @@ -1,7 +1,7 @@ - + -- 2.45.1 From bedcd51f0f520513bcc3d63cdb093be14a8214e8 Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Tue, 23 Jul 2024 22:50:53 +0200 Subject: [PATCH 2/3] ExectOS kernel is not a microkernel --- content/_index.md | 10 +++++----- content/faq.md | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/content/_index.md b/content/_index.md index afef5f5..88ce1fb 100644 --- a/content/_index.md +++ b/content/_index.md @@ -10,11 +10,11 @@ that enables kernel level components to be upgraded without a need to recompile ## XT Architecture ExectOS is a preemptive, reentrant multitasking operating system that implements the XT architecture which derives from -NT™ architecture. It is modular, and consists of two main layers: microkernel and user modes. Its' kernel mode has -full access to the hardware and system resources and runs code in a protected memory area. It consists of executive -services, which is itself made up on many modules that do specific tasks, a kernel and drivers. Unlike the NT™, system -does not feature a separate Hardware Abstraction Layer (HAL) between the physical hardware and the rest of the OS. Instead, -XT architecture integrates a hardware specific code with the kernel. The user mode is made up of subsystems and it has been +NT™ architecture. It is modular, and consists of two main layers: kernel and user modes. Its' kernel mode has full +access to the hardware and system resources and runs code in a protected memory area. It consists of executive services, +which is itself made up on many modules that do specific tasks, a kernel and drivers. Unlike the NT™, system does +not feature a separate Hardware Abstraction Layer (HAL) between the physical hardware and the rest of the OS. Instead, XT +architecture integrates a hardware specific code with the kernel. The user mode is made up of subsystems and it has been designed to run applications written for many different types of operating systems. This allows us to implement any environment subsystem to support applications that are strictly written to the corresponding standard (eg. DOS, or POSIX). diff --git a/content/faq.md b/content/faq.md index c93cbf3..2265614 100644 --- a/content/faq.md +++ b/content/faq.md @@ -40,11 +40,11 @@ some time. However development is mostly focused on providing system core at the #### Is ExectOS another Unix based OS? No. ExectOS implements the XT architecture which derives from NT™ architecture. It is modular, and consists of -two main layers: microkernel and user mode. Its' kernel mode has full access to the hardware and system resources and -runs code in a protected memory area. It consists of executive services, which is itself made up on many modules that -do specific tasks, a kernel and drivers. Unlike the NT™, system does not feature a separate Hardware Abstraction -Layer (HAL) between the physical hardware and the rest of the OS. Instead, XT architecture integrates a hardware specific -code with the kernel. +two main layers: kernel and user mode. Its' kernel mode has full access to the hardware and system resources and runs +code in a protected memory area. It consists of executive services, which is itself made up on many modules that do +specific tasks, a kernel and drivers. Unlike the NT™, system does not feature a separate Hardware Abstraction Layer +(HAL) between the physical hardware and the rest of the OS. Instead, XT architecture integrates a hardware specific code +with the kernel. #### Does ExectOS allow to use Windows drivers? This is one of our goals. Thanks to the NT™ drivers compatibility layer provided by ExectOS, you should be able to -- 2.45.1 From ab69b49674cff2d642bed3de66a91f9b2d913a4a Mon Sep 17 00:00:00 2001 From: Aiken Harris Date: Sun, 11 Aug 2024 15:47:28 +0200 Subject: [PATCH 3/3] Complete the coding style page --- content/contributing/coding-style.md | 121 ++++++++++++++++++++++++++- 1 file changed, 119 insertions(+), 2 deletions(-) diff --git a/content/contributing/coding-style.md b/content/contributing/coding-style.md index c32674e..fe20059 100644 --- a/content/contributing/coding-style.md +++ b/content/contributing/coding-style.md @@ -2,5 +2,122 @@ title = 'ExectOS Coding Style' date = 2024-06-18T00:20:07+02:00 +++ -At the moment of writing this article, no coding style was established. You should check how existing code looks like and -follow its current formatting. +This document outlines our coding style guidelines. If you have suggestions for things that should be clarified better, +[contact with us](/contact-us/). With a continuous stream of contributions and patches we would +like the our code base to remain clean and easy to read and maintain. + +## General +Each source file should contain a header: +``` +/** + * PROJECT: ExectOS + * COPYRIGHT: See COPYING.md in the top level directory + * FILE: path/to/source/file.c + * DESCRIPTION: Description of the purpose of the code in this file + * DEVELOPERS: Your Name + */ +``` +You should only add yourself to the developer list if you are making a significant contribution, which means you +understand the purpose of the code in this file and you can provide support to anyone. + +## Indentation and whitespace + * Set your editor to __4 spaces per tab; never use tabs__. + * Do not add a space or tab at the end of any line. + * Indent both a case label and the case statement of the switch statement. + * When wrapping a too long line, add indentation to match the function call parameter list or expression. + * Always separate operators with a space on both sides, except after C-style cast operator. + * Always use a space after comma. + * A line must not have more than __120 characters__. +``` +switch(Condition) +{ + case 1: + CallFunction(); + break; + default: + CallAnotherFunction(); + break; +} + +CallOtherFunction(Argument1, Argument2, Argument3, + Argument4, Argument5); + +Pointer = (PVOID)Address; +``` + +## Miscellaneous formatting + * Include exactly one empty line between header and `#include` directives. + * Put exactly two empty lines after `#include` directives. + * Include single newline at every file end. + +## Identifiers + * Always use self-describing well chosen identifiers. + * Use full names such as `Message` over abbreviations such as `Mesg`. + * Function names and variables start with uppercase letters and use CamelCaseFormatting. + * Classes, structures, unions and type definitions are UPPERCASE and use underscore. +``` +typedef char BOOL; + +typedef struct _NEW_STRUCTURE +{ + BOOL Enabled; + PVOID Pointer; +} NEW_STRUCTURE, *PNEW_STRUCTURE; + +XTAPI +VOID +KeStartKernel(); +``` + +## Variable declarations + * Always declare all variables at the beginning of the function. + * Use descriptive names, avoid reusing a single variable for different purposes. + * Always use XT API types over defined in C standard. + +## Comments + * Always comment your code properly. + * Use only C-style comments. + * Comment over and under the commented line to avoid producing long lines. + * Do not annotate your comments with your name or initials. + * Avoid expressing sentiments, instead explain why you consider the respective code a hack. +``` +/* This is a C-style comment */ + +/* This is a valid + * multi-line comment */ +``` + +## Documentation + * We use JavaDoc style comments for API documentation. + * The comment separators `/**` and `*/` must be present. + * Every line must be indented. +``` +/** + * Multi-line routine description. + * + * @param Parameter1 + * Description of the first parameter goes here. + * + * @param Parameter2 + * Description of the seconds parameter goes here. + * + * @return Short description about return values. + * + * @since Information from which version a given function is available. + * + * @see Optional link to documentation or reference implementation. + * + * @todo Optional description, telling what is missing in the function implementation. + */ +``` + +## Miscellaneous + * Use NULLPTR instead of 0 for pointers. + * Avoid using assignments in while loops. + * Never use goto statements. + * Never use spaces around unary operators. + * Always put braces (`{` and `}`) on their own lines. + * One-line control clauses should use braces as well. + * Do not use reverse logic in control clauses. + * Do not use spaces around unary operators, before comma and semicolon, or between control statements and their + parentheses. -- 2.45.1