RTMpGetArraySize-generic.cpp revision 0cde281779e97ead3181bbd3b628451fa2b1efe1
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync/* $Id$ */
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync/** @file
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync * IPRT - Multiprocessor, Generic RTMpGetArraySize.
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync */
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync/*
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync * Copyright (C) 2010 Oracle Corporation
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync *
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync * available from http://www.virtualbox.org. This file is free software;
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync * you can redistribute it and/or modify it under the terms of the GNU
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync * General Public License (GPL) as published by the Free Software
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync *
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync * The contents of this file may alternatively be used under the terms
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync * of the Common Development and Distribution License Version 1.0
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync * VirtualBox OSE distribution, in which case the provisions of the
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync * CDDL are applicable instead of those of the GPL.
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync *
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync * You may elect to license modified versions of this file under the
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync * terms and conditions of either the GPL or the CDDL or both.
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync */
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync/*******************************************************************************
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync* Header Files *
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync*******************************************************************************/
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync#include <iprt/mp.h>
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync#include <iprt/cpuset.h>
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync#include "internal/iprt.h"
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsyncRTDECL(uint32_t) RTMpGetArraySize(void)
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync{
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync RTCPUSET CpuSet;
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync return RTCpuLastIndex(RTMpGetSet(&CpuSet)) + 1;
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync}
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsyncRT_EXPORT_SYMBOL(RTMpGetArraySize);
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync
0cde281779e97ead3181bbd3b628451fa2b1efe1vboxsync