summaryrefslogtreecommitdiffstats
path: root/freebsd
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-09-29 08:38:09 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-09-30 09:49:43 +0200
commitb8021fdcf630cdf53fb176a8b73d4f1624b6e193 (patch)
tree5039ffd5e53f5a0eb39e2897f41ce6e77a7acfbf /freebsd
parentDelete rtems_bsd_thread_chain (diff)
downloadrtems-libbsd-b8021fdcf630cdf53fb176a8b73d4f1624b6e193.tar.bz2
critical_enter/exit(): Use inline function
Diffstat (limited to 'freebsd')
-rw-r--r--freebsd/sys/sys/systm.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/freebsd/sys/sys/systm.h b/freebsd/sys/sys/systm.h
index 9e459e0f..27f51973 100644
--- a/freebsd/sys/sys/systm.h
+++ b/freebsd/sys/sys/systm.h
@@ -198,8 +198,24 @@ void panic(const char *, ...) __dead2 __printflike(1, 2);
void cpu_boot(int);
void cpu_flush_dcache(void *, size_t);
void cpu_rootconf(void);
+#ifndef __rtems__
void critical_enter(void);
void critical_exit(void);
+#else /* __rtems__ */
+#include <rtems/score/threaddispatch.h>
+
+static __inline void
+critical_enter(void)
+{
+ _Thread_Disable_dispatch();
+}
+
+static __inline void
+critical_exit(void)
+{
+ _Thread_Enable_dispatch();
+}
+#endif /* __rtems__ */
void init_param1(void);
void init_param2(long physpages);
void init_static_kenv(char *, size_t);