lpack.c
1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#include <sys/cpu.h>
#include <sys/sbd.h>
#include "uif.h"
lpackd()
{
int i;
int failed;
unsigned int oldSR = GetSR();
clear_nofault();
msg_printf(VRB,"Start lpackd\n");
SetSR(oldSR | SR_CU1);
for(i=0;i<75;i++) {
failed=lpackd_();
if (failed == 1) {
SetSR(oldSR);
return(1);
}
/* if(Chkpe() == 1) return(1); */
}
/* msg_printf(VRB,"\nStart swapped cache lpackd\n");
for(i=0;i<50;i++) {
swap_cache();
failed=lpackd_();
if (failed == 1 || Chkpe() == 1) {
unswap_cache();
return(1);
}
}
unswap_cache();
*/
printf("\n");
SetSR(oldSR);
return(0);
}
#ifdef NOTDEF
lpackd_swap()
{
int i;
int failed;
clear_nofault();
findfp();
msg_printf(VRB,"\nStart swapped cache lpackd\n");
for(i=0;i<50;i++) {
swap_cache();
failed=lpackd_();
if (failed == 1 || Chkpe() == 1) {
unswap_cache();
return(1);
}
}
unswap_cache();
printf("\n");
return(0);
}
#endif
strprnt_(char **a) { printf("%s", a); }
err_strprnt_(char **a) { msg_printf(ERR,"%s", a); }
newline_() { printf("\n"); }
dblprnt_(double *d)
{
int exp;
char buf[64];
exp = _dtoa(buf,20,*d,1) + 1 ;
buf[0]='.';
printf(" %sE%d", buf,exp);
}