mp-r0drv-linux.c revision 2c8aed3abc13f4e22f66eda0e135c6197eea8003
236b2935f217749893b7034e59da3e3568928acevboxsync * IPRT - Multiprocessor, Ring-0 Driver, Linux.
236b2935f217749893b7034e59da3e3568928acevboxsync * Copyright (C) 2008 Oracle Corporation
236b2935f217749893b7034e59da3e3568928acevboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
236b2935f217749893b7034e59da3e3568928acevboxsync * available from http://www.virtualbox.org. This file is free software;
236b2935f217749893b7034e59da3e3568928acevboxsync * you can redistribute it and/or modify it under the terms of the GNU
236b2935f217749893b7034e59da3e3568928acevboxsync * General Public License (GPL) as published by the Free Software
236b2935f217749893b7034e59da3e3568928acevboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
236b2935f217749893b7034e59da3e3568928acevboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
236b2935f217749893b7034e59da3e3568928acevboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
236b2935f217749893b7034e59da3e3568928acevboxsync * The contents of this file may alternatively be used under the terms
236b2935f217749893b7034e59da3e3568928acevboxsync * of the Common Development and Distribution License Version 1.0
236b2935f217749893b7034e59da3e3568928acevboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
236b2935f217749893b7034e59da3e3568928acevboxsync * VirtualBox OSE distribution, in which case the provisions of the
236b2935f217749893b7034e59da3e3568928acevboxsync * CDDL are applicable instead of those of the GPL.
236b2935f217749893b7034e59da3e3568928acevboxsync * You may elect to license modified versions of this file under the
5067a9619d7131c54d4ebb371d9dac91abdd34f6vboxsync * terms and conditions of either the GPL or the CDDL or both.
5067a9619d7131c54d4ebb371d9dac91abdd34f6vboxsync/*******************************************************************************
5067a9619d7131c54d4ebb371d9dac91abdd34f6vboxsync* Header Files *
236b2935f217749893b7034e59da3e3568928acevboxsync*******************************************************************************/
5067a9619d7131c54d4ebb371d9dac91abdd34f6vboxsync return idCpu < RTCPUSET_MAX_CPUS && idCpu < NR_CPUS ? (int)idCpu : -1;
236b2935f217749893b7034e59da3e3568928acevboxsync return iCpu < NR_CPUS ? (RTCPUID)iCpu : NIL_RTCPUID;
5067a9619d7131c54d4ebb371d9dac91abdd34f6vboxsync return false;
5067a9619d7131c54d4ebb371d9dac91abdd34f6vboxsync# else /* < 2.5.29 */
5067a9619d7131c54d4ebb371d9dac91abdd34f6vboxsync } while (idCpu-- > 0);
5067a9619d7131c54d4ebb371d9dac91abdd34f6vboxsync# if defined(CONFIG_HOTPLUG_CPU) /* introduced & uses cpu_present */
# ifdef cpu_online
#ifdef CONFIG_SMP
} while (idCpu-- > 0);
return pSet;
#ifdef CONFIG_SMP
# if defined(num_online_cpus)
return num_online_cpus();
int rc;
return VINF_SUCCESS;
int rc;
return VINF_SUCCESS;
int rc;
return VERR_CPU_NOT_FOUND;
return rc;
int rc;
return VERR_CPU_NOT_FOUND;
return VERR_CPU_OFFLINE;
return VINF_SUCCESS;
return VERR_NOT_SUPPORTED;