- LogF("\nSwitching to task %i, CR3 = 0x%x, EIP = %p, ESP = %p\n",
- nextthread->TID,
- nextthread->MemState.CR3,
- nextthread->SavedState.EIP,
- nextthread->SavedState.ESP
- );
+ // HACK: Ignores switches to the idle threads
+ if( nextthread->TID == 0 || nextthread->TID > giNumCPUs )
+ {
+ LogF("\nSwitching CPU %i to %p (%i %s) - CR3 = 0x%x, EIP = %p, ESP = %p\n",
+ GetCPUNum(),
+ nextthread, nextthread->TID, nextthread->ThreadName,
+ nextthread->MemState.CR3,
+ nextthread->SavedState.EIP,
+ nextthread->SavedState.ESP
+ );
+ }