Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using floating point numbers in device drivers

6 views
Skip to first unread message

Fenster

unread,
Jun 22, 2004, 11:32:17 AM6/22/04
to

Does anyone know if they are allowed or not? If they are, do I need to
do anything to enable their use? If so, what?

The reason I ask is that when I include a 'double' variable I get an
unresolved external __fltused. It doesn't appear to make any difference
if change to use a 'float' variable.

If it makes any difference I'm working on a WDM driver using DriverWorks
(from NuMega's DriverStudio) and VC++ 6, SP6.

Thanks, in anticipation, for any help/comments/advice/pointers to other
sources of help.

--
Fenster

Maxim S. Shatskih

unread,
Jun 22, 2004, 11:40:21 AM6/22/04
to
Look for KeSaveFloatingPointState and friends in the documentation.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
ma...@storagecraft.com
http://www.storagecraft.com


"Fenster" <fen...@croctec.co.uk> wrote in message
news:FO8o$$BfCF2...@FensterPC.croctec.co.uk...

joe rickson

unread,
Jun 22, 2004, 7:05:30 PM6/22/04
to
Two follow up questions to this original question: 1) what library do you
link with to get rid of the __fltused linker error. 2) Are there floor()
and ceil() functions?

Thanks,
Joe


"Maxim S. Shatskih" <ma...@storagecraft.com> wrote in message
news:cb9jmf$2n7r$1...@gavrilo.mtu.ru...

Maxim S. Shatskih

unread,
Jun 22, 2004, 11:37:50 PM6/22/04
to
Try to just define the __fltused variable in one of your .C files.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
ma...@storagecraft.com
http://www.storagecraft.com

"joe rickson" <jric...@micron.com> wrote in message
news:cbadqs$ap2$1...@admin-svc.micron.com...

Fenster

unread,
Jun 23, 2004, 2:52:37 AM6/23/04
to
In message <cbatnp$8hc$1...@gavrilo.mtu.ru>, Maxim S. Shatskih
<ma...@storagecraft.com> writes

> Try to just define the __fltused variable in one of your .C files.
>
I've included a global variable _fltused and the unresolved issue goes
away. Thanks.

Checking through the .c/.cpp/.h files in the "NTDDK" and "Program Files"
(for VC++ and DriverStudio) directories there are different references
to _fltused as int, const int and as ULONG. Does anyone think it will
make any difference? Having tried all three in my build it doesn't seem
to but how can I be sure?

The other thing I found was initialisation of _fltused to 0, 0x9875 and
0x9876 (in different places/files). Does anyone know what the relevance
of these values may be?

Thanks again.

--
Fenster

Fenster

unread,
Jun 23, 2004, 2:52:36 AM6/23/04
to
In message <cb9jmf$2n7r$1...@gavrilo.mtu.ru>, Maxim S. Shatskih
<ma...@storagecraft.com> writes

> Look for KeSaveFloatingPointState and friends in the documentation.
>
I've just tried that and it made no difference, there's still the
unresolved __fltused.
--
Fenster

Doron Holan [MS]

unread,
Jun 23, 2004, 3:50:26 AM6/23/04
to
these functions are not for the linker. the functions are for system
integrity. if you don't call them, you will corrupt the floating point
state of whatever application's thread you are running in. Please also not
the IRQL restrictions on when you can use floating point operations.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Fenster" <fen...@croctec.co.uk> wrote in message

news:a5NfizAZ...@FensterPC.croctec.co.uk...

0 new messages