From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 29 Aug 2007 08:35:37 +0000 (GMT) From: Mathieu JOINIE-MAURIN MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1814019807-1188376537=:48066" Message-ID: <715959.48066.qm@domain.hid> Subject: [Xenomai-help] sqrt() function in xenomai kernel module List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xenomai@xenomai.org --0-1814019807-1188376537=:48066 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi,=0A=0AI need to use a sqrt() function in a kernel module code. I am a be= ginner with Xenomai. Is there any math_module which already exists ?=0A=0AT= hanks in advance,=0A=0AMathieu=0A=0A=0A=0A=0A ________________________= _____________________________________________________ =0ANe gardez plus qu'= une seule adresse mail ! Copiez vos mails vers Yahoo! Mail --0-1814019807-1188376537=:48066 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

I need to use a sqrt() function in a kernel mo= dule code. I am a beginner with Xenomai. Is there any math_module which alr= eady exists ?

Thanks in advance,

Mathieu

= =0A=0A=0A=0A
=0ANe gardez plus qu'une seule adresse ma= il ! Copiez vos mails v= ers Yahoo! Mail --0-1814019807-1188376537=:48066-- From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <46D531A4.4020108@domain.hid> Date: Wed, 29 Aug 2007 10:43:16 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <715959.48066.qm@domain.hid> In-Reply-To: <715959.48066.qm@domain.hid> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig3E16C485955F443724FFB915" Sender: jan.kiszka@domain.hid Subject: Re: [Xenomai-help] sqrt() function in xenomai kernel module List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mathieu JOINIE-MAURIN Cc: xenomai@xenomai.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3E16C485955F443724FFB915 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mathieu JOINIE-MAURIN wrote: > Hi, >=20 > I need to use a sqrt() function in a kernel module code. I am a beginne= r with Xenomai. Is there any math_module which already exists ? Counter question: Why do you need to use math in kernel code? It is generally a sign something is not well split-up between kernel-based driver code and user-space RT applications. To answer your question: No, Xenomai does not come with a kernel math lib because there is not much use for it - generally. Porting the app to user-space is recommended. Jan --------------enig3E16C485955F443724FFB915 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG1TGkniDOoMHTA+kRAqXlAJ4yn9JagMLomqfNGeqxZ+jc656sAACeI4Fr 7WODa7ky0CMg8YflFxe+S4c= =qdQU -----END PGP SIGNATURE----- --------------enig3E16C485955F443724FFB915-- From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <2ff1a98a0708290144i6e25c48dv90c77504874b4d20@domain.hid> Date: Wed, 29 Aug 2007 10:44:36 +0200 From: "Gilles Chanteperdrix" In-Reply-To: <715959.48066.qm@domain.hid> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <715959.48066.qm@domain.hid> Subject: Re: [Xenomai-help] sqrt() function in xenomai kernel module List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mathieu JOINIE-MAURIN Cc: xenomai@xenomai.org On 8/29/07, Mathieu JOINIE-MAURIN wrote: > > Hi, > > I need to use a sqrt() function in a kernel module code. I am a beginner > with Xenomai. Is there any math_module which already exists ? > > Thanks in advance, There is no math module, if you really want to, you can port the libmath from a c library such as the glibc or uclibc, or newlib and make it a kernel module. If you do so, we willl be pleased to add this module to Xenomai. Now, regarding the sqrt function, if what you want is the integer square root of an integer argument, you can use the int_sqrt function, declared in linux/kernel.h. -- Gilles Chanteperdrix