https://github.com/domfarolino/os
Repository to accompany me along me OS journey
https://github.com/domfarolino/os
c concurrency kernel-module linux mutex operating-systems posix posix-apis semaphore synchronization system-calls system-v unix
Last synced: 5 months ago
JSON representation
Repository to accompany me along me OS journey
- Host: GitHub
- URL: https://github.com/domfarolino/os
- Owner: domfarolino
- Created: 2017-09-07T03:37:41.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-09-07T17:01:08.000Z (almost 6 years ago)
- Last Synced: 2025-04-06T05:33:25.658Z (about 1 year ago)
- Topics: c, concurrency, kernel-module, linux, mutex, operating-systems, posix, posix-apis, semaphore, synchronization, system-calls, system-v, unix
- Language: C
- Size: 178 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# os
Repository to accompany me along my OS journey. This repo consists primarily of C code that ranges from the
creation of basic kernel modules to code that utilizes POSIX system calls.
Random things learned:
- A good way to view the default include path for gcc is `echo | gcc -E -Wp,-v -x c -`
- `-E` only runs the C preprocessor
- `-Wp,option` flag passes `option` directly to the preprocessor, bypassing the compiler driver. Here `-v` indicates verbose
- `-` indicates the input will be coming from stdin
- `-x c` indicates the "C" language; this is good to do since we're accepting input from stdin
- Finding the full path of some included header can be done with `echo "#include " | gcc -E -x c -| grep /someHeader.h`
- System calls are found in the second section of the man pages, and therefore can be accessed via `man 2 `
- Wow I finally learned the UNIX filesystem permission model!
- Makefile rule/target stuff: 
- CTRL+v in insert mode in vim inserts a literal copy of the next character (https://stackoverflow.com/a/4781099/3947332)