[comp.sys.atari.st.tech] GNU C and evnt_timer

heavy@zip.eecs.umich.edu (Richard Scott Hall) (04/24/91)

I seem to keep having problems with my C compilers.  First I
had Laser C, but I wanted ANSI so I bought Lattice 5, but it
was quite buggy, so now I am using GNU C.

Anyway, I was using evnt_timer/evnt_multi to wait for a certain
amount of time in Lattice C, then I would poll the serial port
to see if anything had arrived...well, this worked fine for
Lattice with a wait count of 10 (low-count).  Well needless to
say, this doesn't work fine for GNU C.  Any amount of time over
0 is pathetically slow.  I mean I set it to 100 for one particular
instance and I would still be waiting for it to time-out if I
hadn't rebooted.  What's the deal?  Does GNU use seconds instead
of milli-seconds for its timer calls?  I really need to have this
work so I can look for bar-code reader input...it works in Lattice!!

Any help is greatly appreciated.

Richard Hall
University of Michigan

-- 

Standard disclaimer:  I am not me, I am who you think you are...
                      so don't blame me.

rcb@netcom.COM (Roy Bixler) (04/25/91)

In article <1991Apr24.033643.12187@zip.eecs.umich.edu> heavy@zip.eecs.umich.edu (Richard Scott Hall) writes:
>Anyway, I was using evnt_timer/evnt_multi to wait for a certain
>amount of time in Lattice C, then I would poll the serial port
>to see if anything had arrived...well, this worked fine for
>Lattice with a wait count of 10 (low-count).  Well needless to
>say, this doesn't work fine for GNU C.  Any amount of time over
>0 is pathetically slow.  I mean I set it to 100 for one particular
>instance and I would still be waiting for it to time-out if I
>hadn't rebooted.  What's the deal?  Does GNU use seconds instead
>of milli-seconds for its timer calls?  I really need to have this
>work so I can look for bar-code reader input...it works in Lattice!!

No, the problem is that the 'evnt_timer()' and 'evnt_multi() with
timer' calls in GNU C's gemlib are buggy.  The fix is very simple if
you have source code for gemlib - just swap the word order of the
int_in[] parameters.  I have sent this fix to bammi as well, so you
should see it in a future release of gemlib.

>
>Any help is greatly appreciated.
>
>Richard Hall
>University of Michigan
>
>-- 
>
>Standard disclaimer:  I am not me, I am who you think you are...
>                      so don't blame me.


-- 
Roy Bixler
rcb@netcom.com -or- (UUCP) uunet!apple!netcom!rcb
"Just when you think you know it all, it changes!"