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

current processor number

4 views
Skip to first unread message

klauspg

unread,
Aug 24, 1999, 3:00:00 AM8/24/99
to
Hi all,

is there any way to determine the processor number a thread runs on
programmatically from user mode?

Thanks,

Klaus P. Gerlicher
Diamond Multimedia

Jack Dingler

unread,
Aug 25, 1999, 3:00:00 AM8/25/99
to
Not that I'm aware. You can however define which processors a thread
runs on by using SetThreadAffinityMask().

Jack Dingler

Jack Dingler

unread,
Aug 25, 1999, 3:00:00 AM8/25/99
to
The WinAPI call GetThreadContext() returns a context structure with a
DWORD member called Psr. It's defined as 'processor status'. This may
be what you're looking for. See the header file WinNT.h for this
structure.

Note that the Context Structure is platform specific.

Ted Miller

unread,
Aug 25, 1999, 3:00:00 AM8/25/99
to
In the general case such a value would be useless since it could change even
between 2 instructions in the place you're doing something with the value
you got back.

klauspg <kla...@diamondmm.com> wrote in message
news:rs7q83...@corp.supernews.com...

0 new messages