Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F170835805
D52626.id162430.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
733 B
Referenced Files
None
Subscribers
None
D52626.id162430.diff
View Options
diff --git a/sys/sys/_atomic_subword.h b/sys/sys/_atomic_subword.h
--- a/sys/sys/_atomic_subword.h
+++ b/sys/sys/_atomic_subword.h
@@ -205,4 +205,31 @@
#undef _ATOMIC_BYTE_SHIFT
#undef _ATOMIC_HWORD_SHIFT
+static __inline void
+atomic_set_short(volatile u_short *p, u_short bit)
+{
+ u_short v;
+
+ v = atomic_load_short(p);
+ for (;;) {
+ if (atomic_fcmpset_short(p, &v, v | bit))
+ break;
+ }
+}
+
+static __inline void
+atomic_clear_short(volatile u_short *p, u_short bit)
+{
+ u_short v;
+
+ v = atomic_load_short(p);
+ for (;;) {
+ if (atomic_fcmpset_short(p, &v, v & ~bit))
+ break;
+ }
+}
+
+#define atomic_set_16 atomic_set_short
+#define atomic_clear_16 atomic_clear_short
+
#endif /* _SYS__ATOMIC_SUBWORD_H_ */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Sep 7, 10:47 PM (3 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38490760
Default Alt Text
D52626.id162430.diff (733 B)
Attached To
Mode
D52626: powerpc: implement atomic_set/clear_16
Attached
Detach File
Event Timeline
Log In to Comment