summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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>