[cvs] / xvidcore / src / motion / motion_smp.h Repository:
ViewVC logotype

Diff of /xvidcore/src/motion/motion_smp.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3, Mon Feb 27 00:22:31 2006 UTC revision 1.4, Mon Feb 27 12:16:04 2006 UTC
# Line 31  Line 31 
31    
32  #ifdef WIN32  #ifdef WIN32
33    
 # include <winbase.h>  
34  # include <windows.h>  # include <windows.h>
35  # define pthread_t                              HANDLE  # define pthread_t                              HANDLE
36  # define pthread_create(t,u,f,d) *(t)=CreateThread(NULL,0,f,d,0,NULL)  # define pthread_create(t,u,f,d) *(t)=CreateThread(NULL,0,f,d,0,NULL)
37  # define pthread_join(t,s)              { WaitForSingleObject(t,INFINITE); \  # define pthread_join(t,s)              { WaitForSingleObject(t,INFINITE); \
38                                                                          CloseHandle(t); }                                                                          CloseHandle(t); }
39  # define sched_yield()                  Sleep(0);  # define sched_yield()                  Sleep(0);
40  static int pthread_num_processors_np()  static __inline int pthread_num_processors_np()
41  {  {
42          unsigned int p_aff, s_aff, r = 0;          DWORD p_aff, s_aff, r = 0;
43          GetProcessAffinityMask(GetCurrentProcess(), &p_aff, &s_aff);          GetProcessAffinityMask(GetCurrentProcess(), &p_aff, &s_aff);
44          for(; p_aff != 0; p_aff>>=1) r += p_aff&1;          for(; p_aff != 0; p_aff>>=1) r += p_aff&1;
45          return r;          return r;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4