You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/10/16 17:13:49 UTC

[incubator-nuttx] branch master updated: sched/spawn: Add the dummy task_spawnattr_xxxstackyyy in the kernel mode

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 6854cce059 sched/spawn: Add the dummy task_spawnattr_xxxstackyyy in the kernel mode
6854cce059 is described below

commit 6854cce059c8c368107df50bb8dd97e243511368
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Oct 16 20:09:20 2022 +0800

    sched/spawn: Add the dummy task_spawnattr_xxxstackyyy in the kernel mode
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 include/spawn.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/spawn.h b/include/spawn.h
index dbecd88f12..2504f645bb 100644
--- a/include/spawn.h
+++ b/include/spawn.h
@@ -207,6 +207,7 @@ int posix_spawnattr_setsigmask(FAR posix_spawnattr_t *attr,
  * task_spawn()
  */
 
+#ifndef CONFIG_BUILD_KERNEL
 int task_spawnattr_getstackaddr(FAR const posix_spawnattr_t *attr,
                                 FAR void **stackaddr);
 int task_spawnattr_setstackaddr(FAR posix_spawnattr_t *attr,
@@ -216,6 +217,12 @@ int task_spawnattr_getstacksize(FAR const posix_spawnattr_t *attr,
                                 FAR size_t *stacksize);
 int task_spawnattr_setstacksize(FAR posix_spawnattr_t *attr,
                                 size_t stacksize);
+#else
+#  define task_spawnattr_getstackaddr(fa, addr) (*(addr) = NULL, 0)
+#  define task_spawnattr_setstackaddr(fa) (0)
+#  define task_spawnattr_getstacksize(fa, size) (*(size) = 0, 0)
+#  define task_spawnattr_setstacksize(fa) (0)
+#endif
 
 /* Non standard debug functions */