mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
f158a0d538
Closes https://github.com/espressif/esp-idf/issues/6119 Closes https://github.com/espressif/esp-idf/issues/7798
25 lines
441 B
C
25 lines
441 B
C
/*
|
|
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <unistd.h>
|
|
#include <errno.h>
|
|
#include "sdkconfig.h"
|
|
#include "freertos/FreeRTOS.h"
|
|
|
|
#define CPU_NUM portNUM_PROCESSORS
|
|
|
|
long sysconf(int arg)
|
|
{
|
|
switch (arg) {
|
|
case _SC_NPROCESSORS_CONF:
|
|
case _SC_NPROCESSORS_ONLN:
|
|
return CPU_NUM;
|
|
default:
|
|
errno = EINVAL;
|
|
return -1;
|
|
}
|
|
}
|