VirtualBox

Ignore:
Timestamp:
May 5, 2009 5:12:48 PM (16 years ago)
Author:
vboxsync
Message:

IPRT: Implemented RTMpPokeCpu where it made sense (untested).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/mp-r0drv-linux.c

    r15843 r19389  
    320320}
    321321
     322
     323#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
     324/**
     325 * Dummy callback used by RTMpPokeCpu.
     326 *
     327 * @param   pvInfo      Ignored.
     328 */
     329static void rtmpLinuxPokeCpuCallback(void *pvInfo)
     330{
     331    NOREF(pvInfo);
     332}
     333#endif
     334
     335
     336RTDECL(int) RTMpPokeCpu(RTCPUID idCpu)
     337{
     338#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
     339    int rc;
     340
     341    if (!RTMpIsCpuPossible(idCpu))
     342        return VERR_CPU_NOT_FOUND;
     343    if (!RTMpIsCpuOnline(idCpu))
     344        return VERR_CPU_OFFLINE;
     345
     346# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
     347    rc = smp_call_function_single(idCpu, rtmpLinuxPokeCpuCallback, NULL, 0 /* wait */);
     348# elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
     349    rc = smp_call_function_single(idCpu, rtmpLinuxPokeCpuCallback, NULL, 0 /* retry */, 0 /* wait */);
     350# else  /* older kernels */
     351#  error oops
     352# endif /* older kernels */
     353    Assert(rc == 0);
     354    return VINF_SUCCESS;
     355
     356#else  /* older kernels */
     357    /* no unicast here? */
     358    return VERR_NOT_SUPPORTED;
     359#endif /* older kernels */
     360}
     361
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette