Last change
on this file since 26 was
1,
checked in by buchmann, 17 years ago
|
Initial import from CVS repository
|
File size:
979 bytes
|
Line | |
---|
1 | extern char s[]; |
---|
2 | extern int waitInt; |
---|
3 | extern void itoa(int,char*); |
---|
4 | |
---|
5 | void SwitchOnIt(int it) |
---|
6 | { |
---|
7 | int i,ti; |
---|
8 | int *timer=(int*)0xB0000000; |
---|
9 | |
---|
10 | /* Identify the active interrupt of highest priority */ |
---|
11 | for (i=0; i<8; i++) |
---|
12 | if (it&(1<<i)) |
---|
13 | break; |
---|
14 | |
---|
15 | switch (i) { |
---|
16 | case 0: /* SwIt 0 */ |
---|
17 | break; |
---|
18 | case 1: /* SwIt 1 */ |
---|
19 | break; |
---|
20 | case 2: { /* It 0 */ |
---|
21 | int CPU = procnum() << 2; |
---|
22 | int current_time=timer[0 | CPU]; |
---|
23 | uputs("timer interrupt acknowledge at :",procnum()); |
---|
24 | itoa(current_time,s); |
---|
25 | uputs(s,procnum()); |
---|
26 | uputs("",procnum()); |
---|
27 | timer[3 | CPU] = 0; // reset timer irq |
---|
28 | break; |
---|
29 | } |
---|
30 | case 3: /* It 1 */ |
---|
31 | break; |
---|
32 | case 4: /* It 2 */ |
---|
33 | break; |
---|
34 | case 5: /* It 3 */ |
---|
35 | break; |
---|
36 | case 6: /* It 4 */ |
---|
37 | break; |
---|
38 | case 7: /* It 5 */ |
---|
39 | break; |
---|
40 | default: |
---|
41 | break; |
---|
42 | } |
---|
43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.