summaryrefslogtreecommitdiff
path: root/sys/arch/sh/include/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sh/include/atomic.h')
-rw-r--r--sys/arch/sh/include/atomic.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/arch/sh/include/atomic.h b/sys/arch/sh/include/atomic.h
new file mode 100644
index 00000000000..7b9b8aed390
--- /dev/null
+++ b/sys/arch/sh/include/atomic.h
@@ -0,0 +1,20 @@
+/* $OpenBSD: atomic.h,v 1.1 2007/02/06 17:13:33 art Exp $ */
+
+/* Public Domain */
+
+#ifndef __SH_ATOMIC_H__
+#define __SH_ATOMIC_H__
+
+static __inline void
+atomic_setbits_int(__volatile unsigned int *uip, unsigned int v)
+{
+ *uip |= v;
+}
+
+static __inline void
+atomic_clearbits_int(__volatile unsigned int *uip, unsigned int v)
+{
+ *uip &= ~v;
+}
+
+#endif