--- /dev/null
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <pthread.h>
+
+static void *spin(void *uu)
+{
+ while(1) {
+ }
+}
+
+int main(int argc, char **argv)
+{
+ int i, n;
+
+ n = 4;
+ pthread_t threads[n];
+ for(i = 0; i < n; i++) {
+ if(pthread_create(&threads[i], NULL, spin, NULL)) {
+ fprintf(stderr, "loadcpu: pthread_create: %s\n", strerror(errno));
+ exit(1);
+ }
+ }
+ pthread_join(threads[0], NULL);
+ return(0);
+}
+
+/*
+ * Local Variables:
+ * compile-command: "gcc -g -Wall -o loadcpu loadcpu.c -lpthread"
+ * End:
+ */