Under Win98 it is possible to setup at kernel level a callback
when a new thread is scheduled. Call_When_Thread_Switched. I do
not see any kernel support routines that could enable such service.
Anyone know if there is some workaround possible under Win200
at kernel level to get the same callback as Win98.
Thanks
Guy Bonneau
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
I don’t believe there’s any direct support for an equivalent callback in NT.
Perhaps if you explain how you’re using it or what you can’t do without it,
an alternative will be suggested by one of the bright minds here.
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
nt/win2k has no support for this.
-----Original Message-----
From: Guy Bonneau [mailto:xxxxx@Matrox.COM]
Sent: Friday, December 22, 2000 9:10 AM
To: NT Developers Interest List
Subject: [ntdev] Thread context switch callback
Under Win98 it is possible to setup at kernel level a callback
when a new thread is scheduled. Call_When_Thread_Switched. I do
not see any kernel support routines that could enable such service.
Anyone know if there is some workaround possible under Win200
at kernel level to get the same callback as Win98.
Thanks
Guy Bonneau
You are currently subscribed to ntdev as: xxxxx@veritas.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
Use KeSetSwapContextNotifyRoutine.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Guy Bonneau
Sent: Friday, December 22, 2000 6:10 PM
To: NT Developers Interest List
Subject: [ntdev] Thread context switch callback
Under Win98 it is possible to setup at kernel level a callback
when a new thread is scheduled. Call_When_Thread_Switched. I do
not see any kernel support routines that could enable such service.
Anyone know if there is some workaround possible under Win200
at kernel level to get the same callback as Win98.
Thanks
Guy Bonneau
You are currently subscribed to ntdev as: xxxxx@compelson.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
Look for it in ntddk.h
//
// Context swap notify routine.
//
typedef
VOID
(FASTCALL *PSWAP_CONTEXT_NOTIFY_ROUTINE)(
IN HANDLE OldThreadId,
IN HANDLE NewThreadId
);
NTKERNELAPI
VOID
FASTCALL
KeSetSwapContextNotifyRoutine(
IN PSWAP_CONTEXT_NOTIFY_ROUTINE NotifyRoutine
);
Bye,
Sab
-----Original Message-----
From: Wesley Witt [mailto:xxxxx@veritas.com]
Sent: Friday, December 22, 2000 8:03 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Thread context switch callback
nt/win2k has no support for this.
-----Original Message-----
From: Guy Bonneau [mailto:xxxxx@Matrox.COM]
Sent: Friday, December 22, 2000 9:10 AM
To: NT Developers Interest List
Subject: [ntdev] Thread context switch callback
Under Win98 it is possible to setup at kernel level a callback
when a new thread is scheduled. Call_When_Thread_Switched. I do
not see any kernel support routines that could enable such service.
Anyone know if there is some workaround possible under Win200
at kernel level to get the same callback as Win98.
Thanks
Guy Bonneau
You are currently subscribed to ntdev as: xxxxx@veritas.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@mastereye.kiev.ua
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
There’s no exported way to hook context switches. The KeSet… notify
routines mentioned only work in the checked build & even then only one
routine is allowed to be registered with the kernel at any given time. So
anyone who calls that after you will clobber your registration.
There are very reliable ways to hack around this, but unfortunately if
someone else does not hack their way around this problem correctly, it will
break your “correct” hack. So sadly, the shot answer is there isn’t a
guarenteed safe method for being notified of thread swaps in free builds.
-----Original Message-----
From: Hrdina Pavel [mailto:xxxxx@compelson.com]
Sent: Friday, December 22, 2000 1:10 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Thread context switch callback
Importance: High
Use KeSetSwapContextNotifyRoutine.
-----Original Message-----
From: xxxxx@lists.osr.com [
mailto:xxxxx@lists.osr.com
mailto:xxxxx ]On Behalf Of Guy Bonneau
Sent: Friday, December 22, 2000 6:10 PM
To: NT Developers Interest List
Subject: [ntdev] Thread context switch callback
Under Win98 it is possible to setup at kernel level a callback
when a new thread is scheduled. Call_When_Thread_Switched. I do
not see any kernel support routines that could enable such service.
Anyone know if there is some workaround possible under Win200
at kernel level to get the same callback as Win98.
Thanks
Guy Bonneau
—
You are currently subscribed to ntdev as: xxxxx@compelson.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
—
You are currently subscribed to ntdev as: xxxxx@timesn.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
—
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</mailto:xxxxx>
RE: [ntdev] Thread context switch callbackThere was something like KeSetSwapContextNotifyRoutine, but this is not documented.
----- Original Message -----
From: Dave Hart
To: NT Developers Interest List
Sent: Friday, December 22, 2000 8:51 PM
Subject: [ntdev] RE: Thread context switch callback
I don’t believe there’s any direct support for an equivalent callback in NT. Perhaps if you explain how you’re using it or what you can’t do without it, an alternative will be suggested by one of the bright minds here.
You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com