source: azure_iot_hub/trunk/musl-1.1.18/src/sched/sched_cpucount.c@ 388

Last change on this file since 388 was 388, checked in by coas-nagasima, 5 years ago

Azure IoT Hub Device C SDK を使ったサンプルの追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-csrc
File size: 251 bytes
Line 
1#define _GNU_SOURCE
2#include <sched.h>
3
4int __sched_cpucount(size_t size, const cpu_set_t *set)
5{
6 size_t i, j, cnt=0;
7 const unsigned char *p = (const void *)set;
8 for (i=0; i<size; i++) for (j=0; j<8; j++)
9 if (p[i] & (1<<j)) cnt++;
10 return cnt;
11}
Note: See TracBrowser for help on using the repository browser.