[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom [Jan Albiez <albiez@fzi.de>] (fwd)



>From owner-rtl Mon May 21 09:06:36 2001
Received: from relay.xlink.net (relay.xlink.net [193.141.40.4])
	by hq.fsmlabs.com (8.11.2/8.11.2) with ESMTP id f4LF6Zr20666
	for <rtl@rtlinux.org>; Mon, 21 May 2001 09:06:36 -0600
Received: from gate.fzi.de (gate.fzi.de [141.21.4.3])
	by relay.xlink.net (8.9.3/8.8.7) with ESMTP id RAA16949
	for <rtl@rtlinux.org>; Mon, 21 May 2001 17:01:51 +0200 (MET DST)
Received: from alfa.fzi.de by gate.fzi.de (PP) with ESMTP;
          Mon, 21 May 2001 17:01:52 +0200
Received: from audi.fzi.de (actually audi) by alfa (PP) with SMTP;
          Mon, 21 May 2001 17:01:36 +0200
Received: from albiez by audi.fzi.de with local (Exim 3.12 #1 (Debian)) 
          id 151rBq-0001j2-00 for <rtl@rtlinux.org>;
          Mon, 21 May 2001 17:01:46 +0200
Date: Mon, 21 May 2001 17:01:46 +0200
To: RT Linux Mailinglist <rtl@rtlinux.org>
Subject: Using libm in rt-space
Message-ID: <20010521170146.A6442@audi.fzi.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
From: Jan Albiez <albiez@fzi.de>

Hoi !

I try to use some mathematical function inside a rt-thread. At the begining
this didn't seemed to be a problem. I linked the libm.a (part of glibc)
statically to my rt-module and everything was fine. The functions used until
this point had been the sine and the cosine functions.

The problemarised the moment i used asin the first time. Somehow the
designers of glibc have decided that some of the functions should make use
of the classical standard error output via fputs and stderr. These symbols
are (naturally) not available in rt-context. At the moment I just have
defined myself a workaround of the form:

int fputs(void) {
	return 1;
}

int stderr;

which so far satisfies the linker, and works as far as i can see. But i
don't think this is clean. Has anybody a better solution ?

blue skies
	Jan
-- 
-- Jan Christian Albiez --    
-- FZI -- Haid-und-Neu-Str. 10-14 -- 76131 Karlsruhe -- +49 721 9654 206 --
-- segmentation violation in module reality.o ...
                            ... please shutdown your universe and reboot --