We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0662b56 commit 7906735Copy full SHA for 7906735
2 files changed
crypt/speeds.c
@@ -11,6 +11,7 @@
11
#include <signal.h>
12
#include <stdio.h>
13
#include <stdlib.h>
14
+#include <sched.h>
15
16
/* Some modifications for the MiNTLib. Especially also test MD5
17
encryption. */
@@ -159,6 +160,7 @@ main ()
159
160
#else
161
s = crypt (s, SALT);
162
#endif
163
+ sched_yield();
164
}
165
166
return 1;
time/test-clock.c
@@ -3,6 +3,7 @@
3
#include <time.h>
4
#include <unistd.h>
5
6
7
8
volatile int gotit = 0;
9
@@ -27,7 +28,7 @@ main (int argc, char ** argv)
27
28
29
alarm(1);
30
start = clock ();
- while (!gotit);
31
+ while (!gotit) sched_yield();
32
stop = clock ();
33
34
printf ("%ld clock ticks per second (start=%ld,stop=%ld)\n",
0 commit comments