flat assembler
Message board for the users of flat assembler.
  
       
      Index
      > Windows > [solved] How Suspend/Resume thread? | 
  
| Author | 
  | 
              
| 
                  
                   nairam 05 Sep 2016, 21:38 
                  This not work. I mean set thread dor concrete cpu core
 
        invoke CreateThread,0,1024,vlakno2,dword edi,4,dword [thread2] invoke SetThreadIdealProcessor,dword [thread2],0 invoke ResumeThread,dword [thread2] nairam 
  | 
              |||||||||||
                  
  | 
              
| 
                  
                   AsmGuru62 06 Sep 2016, 02:12 
                  Here:
 
                https://msdn.microsoft.com/en-us/library/windows/desktop/ms686253(v=vs.85).aspx 1. The system schedules threads on their preferred processors whenever possible. So, if you call the function - it is not guaranteed to run in the core you specify. 2. Did you call GetLastError() AFTER calling SetThreadIdealProcessor() - maybe it will give you some idea why system failed to schedule your thread for the specified core.  | 
              |||
                  
  | 
              
| 
                  
                   revolution 06 Sep 2016, 13:55 
                  You need to use the thread handle, not the ID. The handle is returned in EAX. 
                 | 
              |||
                  
  | 
              
| 
                  
                   nairam 06 Sep 2016, 15:08 
                  Yes, with handle in EAX work. Tnx. 
                 | 
              |||
                  
  | 
              
< Last Thread | Next Thread >  | 
    
Forum Rules: 
  | 
    
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.