mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 20:08:15 +08:00
sched/spawn: Support task_spawnattr_[set|get]stacksize in kernel mode
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
committed by
Masayuki Ishikawa
parent
55083b31a9
commit
b9b032af72
@@ -23,21 +23,17 @@
|
||||
CSRCS += lib_psfa_addaction.c lib_psfa_addclose.c lib_psfa_adddup2.c
|
||||
CSRCS += lib_psfa_addopen.c lib_psfa_destroy.c lib_psfa_init.c
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_FEATURES),y)
|
||||
CSRCS += lib_psfa_dump.c
|
||||
endif
|
||||
|
||||
CSRCS += lib_psa_getflags.c lib_psa_getschedparam.c lib_psa_getschedpolicy.c
|
||||
CSRCS += lib_psa_init.c lib_psa_setflags.c lib_psa_setschedparam.c
|
||||
CSRCS += lib_psa_setschedpolicy.c lib_psa_getsigmask.c lib_psa_setsigmask.c
|
||||
CSRCS += lib_psa_getstackaddr.c lib_psa_setstackaddr.c
|
||||
|
||||
ifneq ($(CONFIG_BUILD_KERNEL),y)
|
||||
CSRCS += lib_psa_getstackaddr.c lib_psa_setstackaddr.c
|
||||
CSRCS += lib_psa_getstacksize.c lib_psa_setstacksize.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_FEATURES),y)
|
||||
CSRCS += lib_psa_dump.c
|
||||
CSRCS += lib_psfa_dump.c lib_psa_dump.c
|
||||
endif
|
||||
|
||||
# Add the spawn directory to the build
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
#include <spawn.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifndef CONFIG_BUILD_KERNEL
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@@ -59,5 +57,3 @@ int task_spawnattr_getstacksize(FAR const posix_spawnattr_t *attr,
|
||||
*stacksize = attr->stacksize;
|
||||
return OK;
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_BUILD_KERNEL */
|
||||
|
||||
@@ -98,11 +98,9 @@ int posix_spawnattr_init(posix_spawnattr_t *attr)
|
||||
attr->budget.tv_nsec = param.sched_ss_init_budget.tv_nsec;
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_ARCH_ADDRENV
|
||||
/* Default stack size */
|
||||
|
||||
attr->stacksize = CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE;
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
#include <spawn.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifndef CONFIG_BUILD_KERNEL
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@@ -59,5 +57,3 @@ int task_spawnattr_setstacksize(FAR posix_spawnattr_t *attr,
|
||||
attr->stacksize = stacksize;
|
||||
return OK;
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_BUILD_KERNEL */
|
||||
|
||||
Reference in New Issue
Block a user