mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 17:33:08 +08:00
sysconf: Implement _SC_ATEXIT_MAX query
and remove the incorrect macro ATEXIT_MAX Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: Ia5d7dafc50e942f62f95137313c34741c6dd60ba
This commit is contained in:
committed by
Abdelatif Guettouche
parent
f24c71be32
commit
1e166f7ecb
@@ -41,6 +41,7 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sched.h>
|
||||
#include <errno.h>
|
||||
|
||||
/****************************************************************************
|
||||
@@ -225,6 +226,13 @@ long sysconf(int name)
|
||||
case _SC_OPEN_MAX:
|
||||
return CONFIG_NFILE_DESCRIPTORS;
|
||||
|
||||
case _SC_ATEXIT_MAX:
|
||||
#ifdef CONFIG_SCHED_EXIT_MAX
|
||||
return CONFIG_SCHED_EXIT_MAX;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
default:
|
||||
#if 0 /* Assume valid but not implemented for the time being */
|
||||
errcode = EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user