repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
ARM divsi3.S: raise(SIGFPE) when called for
[minix.git]
/
drivers
/
audio
/
es1371
/
wait.c
blob
97145abe56d9faf401585cfefd5fb2fb12ead524
1
#include <minix/drivers.h>
2
#include <sys/types.h>
3
#include
"pci_helper.h"
4
5
6
int
WaitBitd
(
int
paddr
,
int
bitno
,
int
state
,
long
tmout
)
7
{
8
unsigned long
mask
;
9
10
mask
=
1UL
<<
bitno
;
11
tmout
*=
5000
;
12
13
if
(
state
) {
14
while
(
tmout
-- >
0
) {
15
if
(
pci_inl
(
paddr
) &
mask
) {
16
return
0
;
17
}
18
}
19
}
else
{
20
while
(
tmout
-- >
0
) {
21
if
(!(
pci_inl
(
paddr
) &
mask
)) {
22
return
0
;
23
}
24
}
25
}
26
return
0
;
27
}