VirtualBox

Changeset 100194 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Jun 16, 2023 8:19:12 AM (18 months ago)
Author:
vboxsync
Message:

Runtime/mp-linux.cpp: Implement RTMpCpuId() for ARM based on sched_getcpu(), bugref:10457

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/linux/mp-linux.cpp

    r98103 r100194  
    5252#include <iprt/linux/sysfs.h>
    5353
     54
     55#if defined(RT_ARCH_ARM64) || defined(RT_ARCH_ARM32)
     56# include <sched.h>
     57
     58RTDECL(RTCPUID) RTMpCpuId(void)
     59{
     60    int rc = sched_getcpu();
     61    if (rc >= 0)
     62        return (RTCPUID)rc;
     63
     64    return NIL_RTCPUID;
     65}
     66#endif
    5467
    5568/**
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