You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
4 months ago | |
|---|---|---|
| arch | 4 months ago | |
| boot | 4 months ago | |
| compiler | 7 months ago | |
| debug | 6 months ago | |
| device | 5 months ago | |
| interrupt | 4 months ago | |
| object | 4 months ago | |
| sync | 4 months ago | |
| thread | 4 months ago | |
| tools | 5 months ago | |
| user | 4 months ago | |
| utils | 6 months ago | |
| .gitignore | 6 months ago | |
| 1 | 4 months ago | |
| CPPLINT.cfg | 7 months ago | |
| LICENSE | 7 months ago | |
| Makefile | 7 months ago | |
| README.md | 7 months ago | |
| compile_flags.txt | 5 months ago | |
| main.cc | 4 months ago | |
| nix-develop.sh | 7 months ago | |
| notes | 4 months ago | |
| types.h | 7 months ago | |
README.md
MPStuBS - Multiprozessor Studenten Betriebssystem
Coding Guidelines
Similar to Google C++ Style Guide but with following exceptions:
- No license boilerplate
- Tabs instead of Spaces
- Line length of 120 characters
#pragma onceinstead of#includeguards
The code should be self-documenting, don't state the obvious! However, this does not make comments superfluous: Since good naming is sometimes not enough, more advanced parts need to be documented, so any operating system developer should be able to easily understand your code.
Naming Convention
-
Variables: lowercase with underscore
char* variable_name; -
Constants (and enum values): uppercase with underscore
const int CONST_VALUE = 42; -
Type Names (
class/struct/namespace/enum): Capital letter, camel caseclass SomeClassName; -
Methods/Functions (C++): start with lowercase letter, then camel case
void someFunctionName(); -
extern "C" Functions: lowercase with underscore (like variables).
void interrupt_handler(int vector); -
File Names: lowercase, main type name, underscores only if is a sub type
folder/classname.cc