Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit79dd254

Browse files
committed
Use volatile write operation for 'set_mask_raw' function
The other methods had previously been updated to use volatile memops,but due to an oversight this method was missed.Fixes#31.Thanks to@MalteT for reporting this issue.
1 parent41967ed commit79dd254

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/register.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub trait Register : Sized {
5252
#[inline(always)]
5353
fnset_mask_raw(mask:Self::T){
5454
unsafe{
55-
*Self::ADDRESS |= mask;
55+
core::ptr::write_volatile(Self::ADDRESS, core::ptr::read_volatile(Self::ADDRESS) | mask);
5656
}
5757
}
5858

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp