diff options
| author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-09-11 06:10:15 -0400 |
|---|---|---|
| committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-09-11 06:10:15 -0400 |
| commit | 05d7c26fbe8ce8edc2e3cb43268d567bdbecae81 (patch) | |
| tree | 6e011173e437ad4da7437048a6883e22253b32dd /bin/np_test.c | |
| parent | 1204cad24dd4eb538863360b18363781d56eefc0 (diff) | |
| parent | 8680f73bd0377d87925a2f7854c75a4a8b09cff7 (diff) | |
Merge branch 'remove-old-tests'2008.3
Diffstat (limited to 'bin/np_test.c')
| -rw-r--r-- | bin/np_test.c | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/bin/np_test.c b/bin/np_test.c deleted file mode 100644 index dad68aa..0000000 --- a/bin/np_test.c +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | #include <stdio.h> | ||
| 2 | #include <stdlib.h> | ||
| 3 | #include <signal.h> | ||
| 4 | #include <unistd.h> | ||
| 5 | #include <sys/time.h> | ||
| 6 | #include <sys/wait.h> | ||
| 7 | #include <sys/types.h> | ||
| 8 | #include <sys/stat.h> | ||
| 9 | #include <fcntl.h> | ||
| 10 | |||
| 11 | #include "litmus.h" | ||
| 12 | |||
| 13 | #define US_PER_MS 1000 | ||
| 14 | |||
| 15 | #define NUMTASKS 4 | ||
| 16 | |||
| 17 | int prefix(void) | ||
| 18 | { | ||
| 19 | char field[1024]; | ||
| 20 | int prefix[1024]; | ||
| 21 | int i, sum = 0; | ||
| 22 | |||
| 23 | for (i = 0; i < 1024; i++) { | ||
| 24 | sum += field[i]; | ||
| 25 | prefix[i] = sum; | ||
| 26 | } | ||
| 27 | return sum; | ||
| 28 | } | ||
| 29 | |||
| 30 | |||
| 31 | void do_stuff(void) | ||
| 32 | { | ||
| 33 | int i =0, j =0; | ||
| 34 | |||
| 35 | for (; i < 50000; i++) | ||
| 36 | j += prefix(); | ||
| 37 | } | ||
| 38 | |||
| 39 | #define CALL(sc) do { ret = sc; if (ret == -1) {perror(" (!!) " #sc " failed: "); /*exit(1)*/;}} while (0); | ||
| 40 | |||
| 41 | |||
| 42 | int main(int argc, char** argv) | ||
| 43 | { | ||
| 44 | int ret; | ||
| 45 | |||
| 46 | init_litmus(); | ||
| 47 | |||
| 48 | enter_np(); | ||
| 49 | |||
| 50 | do_stuff(); | ||
| 51 | |||
| 52 | exit_np(); | ||
| 53 | |||
| 54 | |||
| 55 | return 0; | ||
| 56 | } | ||
