thread-affinity-solaris.cpp revision 9293c97e596e78708cccd910d5b7bac07fe194b1
de4157257515400c2c25373591135f110227b68cvboxsync * IPRT - Thread Affinity, Solaris ring-3 implementation.
eeb6c0c9cd7482b990f5b20f9b7c867e501dd392vboxsync * Copyright (C) 2011 Oracle Corporation
b263fac6f6e7fa933c7bfb2a45d598fe8e458c09vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
b263fac6f6e7fa933c7bfb2a45d598fe8e458c09vboxsync * available from http://www.virtualbox.org. This file is free software;
b263fac6f6e7fa933c7bfb2a45d598fe8e458c09vboxsync * you can redistribute it and/or modify it under the terms of the GNU
b263fac6f6e7fa933c7bfb2a45d598fe8e458c09vboxsync * General Public License (GPL) as published by the Free Software
b263fac6f6e7fa933c7bfb2a45d598fe8e458c09vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
b263fac6f6e7fa933c7bfb2a45d598fe8e458c09vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
b263fac6f6e7fa933c7bfb2a45d598fe8e458c09vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
b263fac6f6e7fa933c7bfb2a45d598fe8e458c09vboxsync * The contents of this file may alternatively be used under the terms
b263fac6f6e7fa933c7bfb2a45d598fe8e458c09vboxsync * of the Common Development and Distribution License Version 1.0
b263fac6f6e7fa933c7bfb2a45d598fe8e458c09vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
de4157257515400c2c25373591135f110227b68cvboxsync * VirtualBox OSE distribution, in which case the provisions of the
de4157257515400c2c25373591135f110227b68cvboxsync * CDDL are applicable instead of those of the GPL.
de4157257515400c2c25373591135f110227b68cvboxsync * You may elect to license modified versions of this file under the
de4157257515400c2c25373591135f110227b68cvboxsync * terms and conditions of either the GPL or the CDDL or both.
de4157257515400c2c25373591135f110227b68cvboxsync/*******************************************************************************
de4157257515400c2c25373591135f110227b68cvboxsync* Header Files *
de4157257515400c2c25373591135f110227b68cvboxsync*******************************************************************************/
de4157257515400c2c25373591135f110227b68cvboxsync/* Note! The current implementation can only bind to a single CPU. */
de4157257515400c2c25373591135f110227b68cvboxsyncRTR3DECL(int) RTThreadSetAffinity(PCRTCPUSET pCpuSet)
de4157257515400c2c25373591135f110227b68cvboxsync rc = processor_bind(P_LWPID, P_MYID, PBIND_NONE, NULL);
de4157257515400c2c25373591135f110227b68cvboxsync unsigned iCpu = 0;
de4157257515400c2c25373591135f110227b68cvboxsync || RTCpuSetIsEqual(pCpuSet, RTMpGetPresentSet(&PresentSet)))
de4157257515400c2c25373591135f110227b68cvboxsync rc = processor_bind(P_LWPID, P_MYID, PBIND_NONE, NULL);
de4157257515400c2c25373591135f110227b68cvboxsyncRTR3DECL(int) RTThreadGetAffinity(PRTCPUSET pCpuSet)