summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgnucode <gnucode@web>2025-06-15 23:42:50 +0200
committerGNU Hurd web pages engine <web-hurd@gnu.org>2025-06-15 23:42:50 +0200
commit86a583ba43e15d9ddf9d45576951172b21cc49fa (patch)
tree62cb33de7819c0f947ab6507181f07bf4a88615b
parentfa27dfe787aeb1f41c109fc2ddc8e937ce952cd9 (diff)
-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>