summaryrefslogtreecommitdiff
path: root/uLan/ports/os/rtems/arch/sys_arch.h
diff options
context:
space:
mode:
authorKinsey Moore <kinsey.moore@oarcorp.com>2022-06-16 13:32:21 -0500
committerKinsey Moore <kinsey.moore@oarcorp.com>2022-07-12 08:41:46 -0500
commitc3b8ce71c4897be9984e555d8f1042e273edaa35 (patch)
tree5d0960badf954c4dc9dd6e34736652a754091042 /uLan/ports/os/rtems/arch/sys_arch.h
parent3a518f046c61a73a4558083b40238204f135eb1f (diff)
lwip: Add support for SMP systems
For BSPs that support SMP, the sys_arch_protect and sys_arch_unprotect calls must use a global mutex instead of a local CPU interrupt disable to protect critical sections.
Diffstat (limited to 'uLan/ports/os/rtems/arch/sys_arch.h')
-rw-r--r--uLan/ports/os/rtems/arch/sys_arch.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/uLan/ports/os/rtems/arch/sys_arch.h b/uLan/ports/os/rtems/arch/sys_arch.h
index a80244d..6ec578b 100644
--- a/uLan/ports/os/rtems/arch/sys_arch.h
+++ b/uLan/ports/os/rtems/arch/sys_arch.h
@@ -68,7 +68,16 @@ typedef port_mailbox_t sys_mbox_t;
typedef port_sem_t sys_sem_t;
typedef rtems_id sys_thread_t;
typedef port_mutex_t sys_mutex_t;
+#ifdef __rtems__
+#include <rtems/score/threaddispatch.h>
+#ifdef RTEMS_SMP
+typedef Per_CPU_Control *sys_prot_t;
+#else
typedef rtems_interrupt_level sys_prot_t;
+#endif
+#else
+typedef rtems_interrupt_level sys_prot_t;
+#endif
void
sys_arch_delay(unsigned int x);