On Fri, 8 Sep 2000, Laurens Holst wrote:

> > Yes, a timeout is needed for such situations. But as long as the other
> > side is connected (and running an os with JUMP drivers), everything should
> > be ok and no locks are possible.
> 
> You should _never_ assume that... One flawd bit on the ack line and... The
> receiver thinks he sent an ack and waits for the next data, the sender
> didn't receive an ack so he doesn't send the next packet... wham. Lock.

If I set the joystick port to 1, it cannot go to 0 and stay there, or can
it? even if it can, you should just refresh the signal every now and then
and you can still design a protocol with no dead-lock posibility.

bye,

 main(){int  c[4]   ,x=4  ,l=getpid()  ,i;;   for(  srand(l);c[  x]=-   rand
()%6         ,x--   ;);;  for(         ;44>   x;){  char         a[9] ,*p=
 "%.1f\n",   b[9];x=i=0;  gets(a);for   (l=4 ;l--   ;)x+=-(a[l]  -=48)==
       (b[l  ]=c[   l]);  ;for           (l=0;16    >i;l         =++i %4)x
+=(b[i/4]+   a[l]   ?0:(  a[l]=b[i/4]     =10))     ;printf(p,x  *.1)   ;};}



****
Problems? contact [EMAIL PROTECTED] See also http://www.faq.msxnet.org/
****

Reply via email to