From d2b693a20438416627c8f9106222ccb3fd155aff Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 22 Nov 2021 15:49:07 +0800 Subject: [PATCH] sched: Move g_tcbinfo to include/nuttx/sched.h Signed-off-by: Xiang Xiao --- fs/procfs/fs_procfstcbinfo.c | 2 -- include/nuttx/sched.h | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/procfs/fs_procfstcbinfo.c b/fs/procfs/fs_procfstcbinfo.c index 8551b666eb..09caec2d54 100644 --- a/fs/procfs/fs_procfstcbinfo.c +++ b/fs/procfs/fs_procfstcbinfo.c @@ -87,8 +87,6 @@ static int tcbinfo_stat(FAR const char *relpath, FAR struct stat *buf); * Public Data ****************************************************************************/ -extern struct tcbinfo_s g_tcbinfo; - /* See fs_mount.c -- this structure is explicitly externed there. * We use the old-fashioned kind of initializers so that this will compile * with any compiler. diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h index f9d00b0a47..676dcd997b 100644 --- a/include/nuttx/sched.h +++ b/include/nuttx/sched.h @@ -832,6 +832,10 @@ EXTERN uint32_t g_crit_max[1]; #endif #endif /* CONFIG_SCHED_CRITMONITOR */ +#ifdef CONFIG_DEBUG_TCBINFO +EXTERN struct tcbinfo_s g_tcbinfo; +#endif + /**************************************************************************** * Public Function Prototypes ****************************************************************************/