Mercurial > ecos
diff packages/kernel/current/tests/kcache1.c @ 44:41bd4f3a90de ecos-sw-1999-10-08
Merge from eCos master repository on 1999-10-08-07:47:04-BST
| author | jlarmour |
|---|---|
| date | Fri, 08 Oct 1999 13:16:25 +0000 |
| parents | 29bc183297e1 |
| children | 797268ecc331 |
line wrap: on
line diff
--- a/packages/kernel/current/tests/kcache1.c +++ b/packages/kernel/current/tests/kcache1.c @@ -30,7 +30,7 @@ //#####DESCRIPTIONBEGIN#### // // Author(s): dsm -// Contributors: dsm, nickg +// Contributors: dsm, nickg // Date: 1998-06-18 //####DESCRIPTIONEND#### */ @@ -51,11 +51,12 @@ // ------------------------------------------------------------------------- // If the HAL does not supply this, we supply our own version -#ifdef HAL_DCACHE_SYNC +#ifndef HAL_DCACHE_PURGE_ALL +# ifdef HAL_DCACHE_SYNC -# define HAL_DCACHE_PURGE_ALL() HAL_DCACHE_SYNC() +#define HAL_DCACHE_PURGE_ALL() HAL_DCACHE_SYNC() -#else +# else static cyg_uint8 dca[HAL_DCACHE_SIZE + HAL_DCACHE_LINE_SIZE*2]; @@ -70,6 +71,7 @@ CYG_MACRO_START } \ CYG_MACRO_END +# endif #endif // ------------------------------------------------------------------------- @@ -82,14 +84,12 @@ static cyg_handle_t thread[NTHREADS]; static cyg_thread thread_obj[NTHREADS]; static char stack[NTHREADS][STACKSIZE]; -#define MAXSIZE 1<<18 - -volatile char m[MAXSIZE]; - #ifndef MAX_STRIDE #define MAX_STRIDE 64 #endif +volatile char m[(HAL_DCACHE_SIZE/HAL_DCACHE_LINE_SIZE)*MAX_STRIDE+1]; + // ------------------------------------------------------------------------- static void time0(register cyg_uint32 stride)
