Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167258064
D19287.id54198.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
610 B
Referenced Files
None
Subscribers
None
D19287.id54198.diff
View Options
Index: sys/kern/kern_kcov.c
===================================================================
--- sys/kern/kern_kcov.c
+++ sys/kern/kern_kcov.c
@@ -248,11 +248,16 @@
if (index * 4 + 4 + 1 > info->entries)
return (false);
- buf[index * 4 + 1] = type;
- buf[index * 4 + 2] = arg1;
- buf[index * 4 + 3] = arg2;
- buf[index * 4 + 4] = ret;
- buf[0] = index + 1;
+ while (1) {
+ buf[index * 4 + 1] = type;
+ buf[index * 4 + 2] = arg1;
+ buf[index * 4 + 3] = arg2;
+ buf[index * 4 + 4] = ret;
+
+ if (atomic_cmpset_64(&buf[0], index, index + 1))
+ break;
+ buf[0] = index;
+ }
return (true);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 21, 10:48 AM (6 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37029371
Default Alt Text
D19287.id54198.diff (610 B)
Attached To
Mode
D19287: Check the index hasn't changed after writing the cmp entry
Attached
Detach File
Event Timeline
Log In to Comment