Mercurial > flash_v2
diff packages/hal/common/current/src/hal_stub.c @ 130:eb9fd8c04db3 ecos-sw-2000-10-23
Merge from eCos master repository on 2000-10-23-17:01:37-BST
| author | jlarmour |
|---|---|
| date | Mon, 23 Oct 2000 17:10:57 +0000 |
| parents | 6bd9d475ed4b |
| children | a9ac27ec7abc |
line wrap: on
line diff
--- a/packages/hal/common/current/src/hal_stub.c +++ b/packages/hal/common/current/src/hal_stub.c @@ -769,7 +769,14 @@ int //----------------------------------------------------------------------------- // Memory accessor functions. -volatile void *__mem_fault_handler = (void *)0; +// The __mem_fault_handler pointer is volatile since it is only +// set/cleared by the function below - which does not rely on any +// other functions, so the compiler may decide to not bother updating +// the pointer at all. If any of the memory accesses cause an +// exception, the pointer must be set to ensure the exception handler +// can make use of it. + +void* volatile __mem_fault_handler = (void *)0; /* These are the "arguments" to __do_read_mem and __do_write_mem, which are passed as globals to avoid squeezing them thru
