1/*- 2 * See the file LICENSE for redistribution information. 3 * 4 * Copyright (c) 1997,2008 Oracle. All rights reserved. 5 * 6 * $Id: os_cpu.c,v 12.12 2008/01/08 20:58:46 bostic Exp $ 7 */ 8 9#include "db_config.h" 10 11#include "db_int.h" 12 13/* 14 * __os_cpu_count -- 15 * Return the number of CPUs. 16 * 17 * PUBLIC: u_int32_t __os_cpu_count __P((void)); 18 */ 19u_int32_t 20__os_cpu_count() 21{ 22 SYSTEM_INFO SystemInfo; 23 24 GetSystemInfo(&SystemInfo); 25 26 return ((u_int32_t)SystemInfo.dwNumberOfProcessors); 27} 28