函数源码

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source File:kernel\sys.c Create Date:2022-07-27 10:21:37
首页 Copyright©Brick

2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
SYSCALL_DEFINE3(getcpu, unsigned __user *, cpup, unsigned __user *, nodep,
        struct getcpu_cache __user *, unused)
{
    int err = 0;
    int cpu = raw_smp_processor_id();
 
    if (cpup)
        err |= put_user(cpu, cpup);
    if (nodep)
        err |= put_user(cpu_to_node(cpu), nodep);
    return err ? -EFAULT : 0;
}