summaryrefslogtreecommitdiff
path: root/nacl/cpucycles/hppapstat.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-07-13 10:09:38 -0400
committerirungentoo <irungentoo@gmail.com>2013-07-13 10:09:38 -0400
commitd4fe483efd3e0062f12430efe9deb66d43d914d7 (patch)
treee6aa9ac716ae82cdb15c6e6cb5d9d1d9d29f053b /nacl/cpucycles/hppapstat.c
parent835ef0320d47372eac14bef31c979b8217d04498 (diff)
NaCl moved to other repo.
Diffstat (limited to 'nacl/cpucycles/hppapstat.c')
-rw-r--r--nacl/cpucycles/hppapstat.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/nacl/cpucycles/hppapstat.c b/nacl/cpucycles/hppapstat.c
deleted file mode 100644
index 5ae1e843..00000000
--- a/nacl/cpucycles/hppapstat.c
+++ /dev/null
@@ -1,26 +0,0 @@
1#include <stdio.h>
2#include <unistd.h>
3#include <sys/types.h>
4#include <sys/param.h>
5#include <sys/pstat.h>
6#include <machine/inline.h>
7
8long long cpucycles_hppapstat(void)
9{
10 register long long result;
11 _MFCTL(16,result);
12 return result;
13}
14
15long long cpucycles_hppapstat_persecond(void)
16{
17 struct pst_processor pst;
18 union pstun pu;
19 double result;
20
21 pu.pst_processor = &pst;
22 if (pstat(PSTAT_PROCESSOR,pu,sizeof(pst),1,0) < 0) return 0;
23 result = pst.psp_iticksperclktick;
24 result *= (double) sysconf(_SC_CLK_TCK);
25 return result;
26}