delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/12/10/04:10:26

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Date: Mon, 10 Dec 2001 11:05:11 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Derek <djny AT flashmail DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Does LWP need a coprocessor?
In-Reply-To: <eXTQ7.3442$dB5.286843@news.uswest.net>
Message-ID: <Pine.SUN.3.91.1011210110454.20650H-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019