Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
xiaoxiaoyang
V2EX  ›  Linux

最近有个疑问在做项目移植, 在 Linux 系统里有没有一个函数和 VxWorks 系统中的一个 sysProcNumGet()函数功能是相同的呢?

  •  
  •   xiaoxiaoyang · Aug 6, 2015 · 3286 views
    This topic created in 3959 days ago, the information mentioned may be changed or developed.
    Linux中也应该有类似于VxWorks中这个sysProcNumSet()函数吧,,,求指点
    3 replies    2015-08-07 08:56:25 +08:00
    fishioon
        1
    fishioon  
       Aug 6, 2015
    get_nprocs ?
    oska874
        2
    oska874  
       Aug 6, 2015
    sysProcNumSet 获取cpu 个数?那就是get_nprocs() 或者sysconf(_SC_NPROCESSORS_CONF) 了。
    ps:其实百度一下就出来。
    xiaoxiaoyang
        3
    xiaoxiaoyang  
    OP
       Aug 7, 2015
    感谢
    @fishioon
    @oska874 哦,我想说这两个函数一个是设置处理器号,另一个是获取处理器号的函数吧,参看


    http://www.doc88.com/p-6703749406659.html

    所以想咨询下在强大的Linux操作系统下也应该有吧,但是我不知道,求指导。。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1222 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 23:34 · PVG 07:34 · LAX 16:34 · JFK 19:34
    ♥ Do have faith in what you're doing.