diff options
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/debug.h | 34 | ||||
-rwxr-xr-x | nuttx/include/nuttx/page.h | 20 |
2 files changed, 44 insertions, 10 deletions
diff --git a/nuttx/include/debug.h b/nuttx/include/debug.h index e3c6edc47..9da898485 100644 --- a/nuttx/include/debug.h +++ b/nuttx/include/debug.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/debug.h * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -164,6 +164,18 @@ # define sllvdbg(x...) #endif +#ifdef CONFIG_DEBUG_PAGING +# define pgdbg(format, arg...) dbg(format, ##arg) +# define pglldbg(format, arg...) lldbg(format, ##arg) +# define pgvdbg(format, arg...) vdbg(format, ##arg) +# define pgllvdbg(format, arg...) llvdbg(format, ##arg) +#else +# define pgdbg(x...) +# define pglldbg(x...) +# define pgvdbg(x...) +# define pgllvdbg(x...) +#endif + #ifdef CONFIG_DEBUG_DMA # define dmadbg(format, arg...) dbg(format, ##arg) # define dmalldbg(format, arg...) lldbg(format, ##arg) @@ -297,6 +309,18 @@ # define sllvdbg (void) #endif +#ifdef CONFIG_DEBUG_PAGING +# define pgdbg dbg +# define pglldbg lldbg +# define pgvdbg vdbg +# define pgllvdbg llvdbg +#else +# define pgdbg (void) +# define pglldbg (void) +# define pgvdbg (void) +# define pgllvdbg (void) +#endif + #ifdef CONFIG_DEBUG_DMA # define dmadbg dbg # define dmalldbg lldbg @@ -415,6 +439,14 @@ # define svdbgdumpbuffer(m,b,n) #endif +#ifdef CONFIG_DEBUG_PAGING +# define pgdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) +# define pgvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +#else +# define pgdbgdumpbuffer(m,b,n) +# define pgvdbgdumpbuffer(m,b,n) +#endif + #ifdef CONFIG_DEBUG_DMA # define dmadbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) # define dmavdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) diff --git a/nuttx/include/nuttx/page.h b/nuttx/include/nuttx/page.h index b793e804c..15b8bbcd9 100755 --- a/nuttx/include/nuttx/page.h +++ b/nuttx/include/nuttx/page.h @@ -43,8 +43,10 @@ #include <nuttx/config.h> -#include <stdbool.h> -#include <nuttx/sched.h> +#ifndef __ASSEMBLY__ +# include <stdbool.h> +# include <nuttx/sched.h> +#endif #ifdef CONFIG_PAGING @@ -128,8 +130,8 @@ /* The size of physical and virutal paged address regions will then be: */ -#define PG_PAGED_PSIZE CONFIG_PAGING_NPPAGED << PAGESHIFT) -#define PG_PAGED_VSIZE CONFIG_PAGING_NVPAGED << PAGESHIFT) +#define PG_PAGED_PSIZE (CONFIG_PAGING_NPPAGED << PAGESHIFT) +#define PG_PAGED_VSIZE (CONFIG_PAGING_NVPAGED << PAGESHIFT) /* This positions the paging Read-Only text region. If the configuration * did not override the default, the paged region will immediately follow @@ -174,9 +176,9 @@ #define PG_RAM_PAGES (CONFIG_DRAM_SIZE >> PAGESHIFT) #ifdef CONFIG_PAGING_NDATA -# PG_DATA_NPAGES CONFIG_PAGING_NDATA +# define PG_DATA_NPAGES CONFIG_PAGING_NDATA #elif PG_RAM_PAGES > PG_TEXT_NPPAGES -# PG_DATA_NPAGES (PG_RAM_PAGES - PG_TEXT_NPAGES) +# define PG_DATA_NPAGES (PG_RAM_PAGES - PG_TEXT_NPAGES) #else # error "Not enough memory for this page layout" #endif @@ -223,8 +225,8 @@ * Public Data ****************************************************************************/ -#ifndef __ASSEMBLY - +#ifndef __ASSEMBLY__ + #undef EXTERN #if defined(__cplusplus) #define EXTERN extern "C" @@ -444,6 +446,6 @@ EXTERN int up_fillpage(FAR _TCB *tcb, FAR void *vpage, up_pgcallback_t pg_callba } #endif -#endif /* __ASSEMBLY */ +#endif /* __ASSEMBLY__ */ #endif /* CONFIG_PAGING */ #endif /* __NUTTX_PAGE_H */ |