better programs readme

This commit is contained in:
Anton Lydike 2021-10-10 19:49:24 +02:00
parent bb13cbeca5
commit 999d09359b
2 changed files with 4 additions and 2 deletions

View File

@ -2,8 +2,9 @@
Note that these programs are of poor quality.
* `simple.c` does some arithmetic in a loop, occasionally prints something rather random (the sequence goes `90,90,90,2386,2386,ae86,520c,1cbdc,1cbde...`)
* `spawn.c` this thing spawn a new thread and exits when the thread overwrites a value.
* `simple.c` does some arithmetic in a loop and prints some numbers.
* `spawn.c` this programs spawns a new thread and exits when the thread overwrites a value.
* `threads.c` this program spawns two threads and waits for them to exit. The threads sleep for some time before exiting.
## Compiling

View File

@ -13,6 +13,7 @@ int main()
int a = 144;
while (1) {
// do some nonsense calculation just to be busy
for (int i = 0; i < 10000; i++) {
for (int j = 0; j < 10000; j++) {
a ^= (((a << 16) ^ a) & i) << 4;