Subject: Please help on tsleep() problem
To: None <amiga-dev@NetBSD.ORG>
From: Ignatios Souvatzis <ignatios@theory.cs.uni-bonn.de>
List: amiga-dev
Date: 05/09/1995 16:29:04
Hello,
I'm developing a set of lowelevel drivers for the A2410 "University of
Lowell" card.
My sources are as of 1995 Mar 6.
The ite_ul.c creates instructions for a server program running on the
TMS34010 processor on the A2410, and writes them into a circular
buffer (on the card).
If using busy waiting:
fetch_new_value(writeptr);
newwriteptr := writeptr+1;
fetch_new_value(readptr);
while (newwriteptr == readptr) {
fetch_new_value(readptr);
}
write_stuff(source,*writeptr);
put_writeptr_to_card(newwriteptr);
the buffer codes seems to work under even under heavy (ab)use.
If using a tsleep() call:
...
while (newwriteptr == readptr) {
tsleep((void *)gsp,0,"ulwait",hz/10);
fetch_new_value(readptr);
}
...
and I interrupt a ls -lR /usr | dd of=/dev/ttye4, the system hangs. No
disk activity, no display change (both of them), no cursor reaction on
mouse movement. ctrl-A-A helps.
The above code is called from the 6 ul_somethingorother() functions,
which are called by ite.c.
Should I protect the stuff above by splxxx() for some suitable xxx?
Which one?
Are there any known problems with tsleep() fixed after Mar 6?
Regards,
Ignatios Souvatzis