Mercurial > ecos
comparison packages/hal/common/current/include/hal_if.h @ 1711:dd8ccc367dae
treat lwip as CYGPKG_NET wrt monitor enter and exit
| author | jani |
|---|---|
| date | Thu, 12 Aug 2004 13:04:47 +0000 |
| parents | 9bf998a57d30 |
| children | b1a65d90ce72 |
comparison
equal
deleted
inserted
replaced
| 1710:f03c7ea29ce3 | 1711:dd8ccc367dae |
|---|---|
| 68 // Architecture/var/platform may override the accessor macros. | 68 // Architecture/var/platform may override the accessor macros. |
| 69 #include <cyg/hal/hal_arch.h> | 69 #include <cyg/hal/hal_arch.h> |
| 70 | 70 |
| 71 // Special monitor locking procedures. These are necessary when the monitor | 71 // Special monitor locking procedures. These are necessary when the monitor |
| 72 // and eCos share facilities, e.g. the network hardware. | 72 // and eCos share facilities, e.g. the network hardware. |
| 73 #ifdef CYGPKG_NET | 73 #if defined (CYGPKG_NET) || defined (CYGPKG_NET_LWIP) |
| 74 #include <cyg/hal/hal_intr.h> | 74 #include <cyg/hal/hal_intr.h> |
| 75 #include <cyg/hal/drv_api.h> // cyg_drv_dsr_lock(), etc | 75 #include <cyg/hal/drv_api.h> // cyg_drv_dsr_lock(), etc |
| 76 #define _ENTER_MONITOR() \ | 76 #define _ENTER_MONITOR() \ |
| 77 cyg_uint32 ints; \ | 77 cyg_uint32 ints; \ |
| 78 HAL_DISABLE_INTERRUPTS(ints); \ | 78 HAL_DISABLE_INTERRUPTS(ints); \ |
| 79 cyg_drv_dsr_lock() | 79 cyg_drv_dsr_lock() |
| 80 | 80 |
| 81 #define _EXIT_MONITOR() \ | 81 #define _EXIT_MONITOR() \ |
| 82 cyg_drv_dsr_unlock(); \ | 82 cyg_drv_dsr_unlock(); \ |
| 83 HAL_RESTORE_INTERRUPTS(ints) | 83 HAL_RESTORE_INTERRUPTS(ints) |
| 84 #else // !CYGPKG_NET | 84 #else // !CYGPKG_NET && !CYGPKG_NET_LWIP |
| 85 #define _ENTER_MONITOR() CYG_EMPTY_STATEMENT | 85 #define _ENTER_MONITOR() CYG_EMPTY_STATEMENT |
| 86 #define _EXIT_MONITOR() CYG_EMPTY_STATEMENT | 86 #define _EXIT_MONITOR() CYG_EMPTY_STATEMENT |
| 87 #endif | 87 #endif |
| 88 | 88 |
| 89 //-------------------------------------------------------------------------- | 89 //-------------------------------------------------------------------------- |
