[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom ["Norm Dresner" <ndrez@att.net>] (fwd)
- To: rtl@rtlinux.org
- Subject: BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom ["Norm Dresner" <ndrez@att.net>] (fwd)
- From: Der Herr Hofrat <der.herr@hofr.at>
- Date: Tue, 22 May 2001 05:58:23 +0200 (CEST)
>From owner-rtl Mon May 21 18:44:19 2001
Received: from mtiwmhc28.worldnet.att.net (mtiwmhc28.worldnet.att.net [204.127.131.36])
by hq.fsmlabs.com (8.11.2/8.11.2) with ESMTP id f4M0iIr24870
for <rtl@rtlinux.org>; Mon, 21 May 2001 18:44:19 -0600
Received: from thedm ([12.79.108.100]) by mtiwmhc28.worldnet.att.net
(InterMail vM.4.01.03.16 201-229-121-116-20010115) with SMTP
id <20010522003930.YKXE2093.mtiwmhc28.worldnet.att.net@thedm>
for <rtl@rtlinux.org>; Tue, 22 May 2001 00:39:30 +0000
Message-ID: <014e01c0e257$891bb360$0600a8c0@compumagic>
From: "Norm Dresner" <ndrez@att.net>
To: "rtlinux" <rtl@rtlinux.org>
References: <20010521170146.A6442@audi.fzi.de>
Subject: Re: [rtl] Using libm in rt-space
Date: Mon, 21 May 2001 20:38:34 -0400
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
The "neatest" solution is to take the source code for the functions you're
interested in and modify them to use whatever mechanism you want, either
printk() or no messages output at all.
Alternately, if I was going to use the wrapper-technique you describe, I'd
definitely allow an optional printk() output while I was debugging to see if
there are any hidden problems.
I believe that there are also ways to use a script-file to direct the loader
(ld which IIRC is used to actually do the 'linking') to substitute your own
entry point for one in the original module(s) so that you could then
seamlessly substitute _any_ routines for ones like fprintf(), malloc, etc.
Norm
----- Original Message -----
From: Jan Albiez <albiez@fzi.de>
To: RT Linux Mailinglist <rtl@rtlinux.org>
Sent: Monday, May 21, 2001 11:01 AM
Subject: [rtl] Using libm in rt-space
> 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 --
>
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
> echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
> --
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/
>