syscall: export UP_WRAPSYM/UP_REALSYM macro

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai 2022-12-30 12:47:50 +08:00 committed by Xiang Xiao
parent 34ade7a0b6
commit a86684574f
2 changed files with 13 additions and 7 deletions

View File

@ -33,6 +33,18 @@
* Pre-processor Definitions
****************************************************************************/
#ifdef CONFIG_LIB_SYSCALL
# ifndef UP_WRAPSYM
# define UP_WRAPSYM(s) __wrap_##s
# endif
# ifndef UP_REALSYM
# define UP_REALSYM(s) __real_##s
# endif
#else
# define UP_WRAPSYM(s) s
# define UP_REALSYM(s) s
#endif
/****************************************************************************
* Public Type Definitions
****************************************************************************/

View File

@ -595,13 +595,7 @@ static void generate_wrapper(int nfixed, int nparms)
/* Define macros to get wrapper symbol */
fprintf(stream, "#include <nuttx/arch.h>\n");
fprintf(stream, "#ifndef UP_WRAPSYM\n");
fprintf(stream, "#define UP_WRAPSYM(s) __wrap_##s\n");
fprintf(stream, "#endif\n");
fprintf(stream, "#ifndef UP_REALSYM\n");
fprintf(stream, "#define UP_REALSYM(s) __real_##s\n");
fprintf(stream, "#endif\n\n");
fprintf(stream, "#include <nuttx/arch.h>\n\n");
if (g_parm[COND_INDEX][0] != '\0')
{