Mail Archives: djgpp/2001/12/10/04:10:26
On Sun, 9 Dec 2001, Derek wrote:
> I compiled a program that uses the LWP multitasking library but was unable
> to run it on a 386 machine. I got this message:
>
> Exiting due to signal SIGNOFP
> Coprocessor not available at eip=000035e7
> ...
>
>
> My machine does not have a math coprocessor.
Do simple programs that use floating-point computations run on that
machine, or do they all bail out with a similar message?
In any case, I suggest you set 387=n in the environment and try again.
> Or maybe I don't need to multithread? Here's my situation: I need to
> constantly monitor the serial port while also doing a second countdown timer
> from 15. To the best of my knowledge, the timer would require using sleep(1)
> but this would also pause the serial checking loop if I had both processes
> in the same function. So is there any other option besides multithreading?
It sounds like you could use a timer instead. Timers work by
delivering a SIGALRM signal to your progra when time's up. You then
run your code from a signal handler. For more details, read about the
setitimer function in the library reference docs.
Note that in DJGPP, signal delivery is delayed when the program is not
in protected mode (like when it's in a DOS system call). But LWP uses
signals as well, so it is prone to the same deficiencies.
- Raw text -