/************************************************************************* $Archive: /PACS/OnBoard/u_res.h $ $Revision: 9 $ $Date: 3/14/06 4:32p $ $Author: Pacs Egse $ $Log: /PACS/OnBoard/u_res.h $ * * 9 3/14/06 4:32p Pacs Egse * Version 6.001 * Cleaned and commented *************************************************************************/ #define U_RES_H #ifdef CSL_SHOW_INCLUDE #pragma message( "Including " __FILE__ ) #endif #include "allnodes.h" //these macros are defined to handle concurrent accesses to a shared structure (the big Params structure). //Only one task at a time can have a write access //All tasks can read it whenever they want. #ifdef SIMULATOR #define LOCK_WRITE_RES_PARAMS {KS_ResLockW(RES_PARAMS);} #define UNLOCK_WRITE_RES_PARAMS {KS_ResUnlock(RES_PARAMS);} #define LOCK_READ_RES_PARAMS #define UNLOCK_READ_RES_PARAMS #else //SIMULATOR #define LOCK_WRITE_RES_PARAMS {KS_ResLockW(RES_PARAMS);} #define UNLOCK_WRITE_RES_PARAMS {KS_ResUnlock(RES_PARAMS);} #define LOCK_READ_RES_PARAMS #define UNLOCK_READ_RES_PARAMS #endif //SIMULATOR