FreeBSD/contrib/gcclibs/libgomp/config/mingw32/proc.c
/* Count the CPU's currently available to this process.  */
Count the CPU's currently available to this process.
Count the CPU ' s currently available to this process .
static int
count_avail_process_cpus ()
{
  DWORD_PTR process_cpus;
  DWORD_PTR system_cpus;
  if (GetProcessAffinityMask (GetCurrentProcess (),
			      &process_cpus, &system_cpus))
    {
      unsigned int count;
      for (count = 0; process_cpus != 0; process_cpus >>= 1)  
	if (process_cpus & 1)
	  count++;
      return count;
    }
  return 1;
}
static int count_avail_process_cpus ( ) { DWORD_PTR process_cpus ; DWORD_PTR system_cpus ; if ( GetProcessAffinityMask ( GetCurrentProcess ( ) , & process_cpus , & system_cpus ) ) { unsigned int count ; for ( count = 0 ; process_cpus != 0 ; process_cpus >>= 1 ) if ( process_cpus & 1 ) count ++ ; return count ; } return 1 ; }
Count the CPU's currently available to this process.
Count the CPU ' s currently available to this process .