summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2025-06-30 01:25:02 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-06-30 01:25:02 +0200
commitd7bee7f4d567e0950af822f3f4f66df0ccf7b259 (patch)
treec1e68c588676cd64f7c99b0c9daf281c0f11af5f
parenteb7538bcab2aca998374101bc03dd800e5ef91ce (diff)
parent86a583ba43e15d9ddf9d45576951172b21cc49fa (diff)
Merge branch 'master' of braunbox:~hurd-web/hurd-web
-rw-r--r--faq/context_switch.mdwn8
1 files changed, 7 insertions, 1 deletions
diff --git a/faq/context_switch.mdwn b/faq/context_switch.mdwn
index 2d090c4c..55d20429 100644
--- a/faq/context_switch.mdwn
+++ b/faq/context_switch.mdwn
@@ -17,7 +17,13 @@ It is not, there is no real reason why it would be particularly slow, it is just
about switching virtual addresses and registers, which all OS have to perform
anyway.
-A quick-and-dirty benchmark:
+A quick-and-dirty benchmark.
+
+You can build this file with:
+
+ gcc -pthread -rt -o context-switch context-switch.c
+
+In `context-switch.c` write:
#include <fcntl.h>
#include <semaphore.h>