<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/std/src/sys/sync/rwlock, branch master</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=master</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-08-16T12:28:31+00:00</updated>
<entry>
<title>library: Migrate from `cfg_if` to `cfg_select`</title>
<updated>2025-08-16T12:28:31+00:00</updated>
<author>
<name>Josh Triplett</name>
<email>josh@joshtriplett.org</email>
</author>
<published>2025-08-10T21:25:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1ae4a0cc3487f28b29f36afe8056535afad21e7b'/>
<id>urn:sha1:1ae4a0cc3487f28b29f36afe8056535afad21e7b</id>
<content type='text'>
Migrate the standard library from using the external `cfg_if` crate to
using the now-built-in `cfg_select` macro.

This does not yet eliminate the dependency from
`library/std/Cargo.toml`, because while the standard library itself no
longer uses `cfg_if`, it also incorporates the `backtrace` crate, which
does.

Migration assisted by the following vim command (after selecting the
full `cfg_if!` invocation):

```
'&lt;,'&gt;s/\(cfg_if::\)\?cfg_if/cfg_select/ | '&lt;,'&gt;s/^\( *\)} else {/\1}\r\1_ =&gt; {/c | '&lt;,'&gt;s/^\( *\)} else if #\[cfg(\(.*\))\] /\1}\r\1\2 =&gt; /e | '&lt;,'&gt;s/if #\[cfg(\(.*\))\] {/\1 =&gt; {/e
```

This is imperfect, but substantially accelerated the process. This
prompts for confirmation on the `} else {` since that can also appear
inside one of the arms. This also requires manual intervention to handle
any multi-line conditions.
</content>
</entry>
<entry>
<title>use generic Atomic type where possible</title>
<updated>2025-04-26T23:18:08+00:00</updated>
<author>
<name>Christopher Durham</name>
<email>cad97@cad97.com</email>
</author>
<published>2024-09-19T04:15:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4d93f6056824c338751f19356d33bb61ce818749'/>
<id>urn:sha1:4d93f6056824c338751f19356d33bb61ce818749</id>
<content type='text'>
in core/alloc/std only for now, and ignoring test files

Co-authored-by: Pavel Grigorenko &lt;GrigorenkoPV@ya.ru&gt;
</content>
</entry>
<entry>
<title>update cfgs</title>
<updated>2024-11-27T15:14:54+00:00</updated>
<author>
<name>Boxy</name>
<email>rust@boxyuwu.dev</email>
</author>
<published>2024-11-27T15:14:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=22998f078588cf479530ff93e4a66ab4bb666398'/>
<id>urn:sha1:22998f078588cf479530ff93e4a66ab4bb666398</id>
<content type='text'>
</content>
</entry>
<entry>
<title>std: allow after-main use of synchronization primitives</title>
<updated>2024-11-18T16:55:36+00:00</updated>
<author>
<name>joboet</name>
<email>jonasboettiger@icloud.com</email>
</author>
<published>2024-11-07T16:13:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5a856b82f3a1bf335e0e62d92c800d8436977af1'/>
<id>urn:sha1:5a856b82f3a1bf335e0e62d92c800d8436977af1</id>
<content type='text'>
By creating an unnamed thread handle when the actual one has already been destroyed, synchronization primitives using thread parking can be used even outside the Rust runtime.

This also fixes an inefficiency in the queue-based `RwLock`: if `thread::current` was not initialized yet, it will create a new handle on every parking attempt without initializing `thread::current`. The private `current_or_unnamed` function introduced here fixes this.
</content>
</entry>
<entry>
<title>fix `DOWNGRADED` bit unpreserved</title>
<updated>2024-11-16T17:31:14+00:00</updated>
<author>
<name>Connor Tsui</name>
<email>87130162+connortsui20@users.noreply.github.com</email>
</author>
<published>2024-11-16T17:22:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=782b07e1ff4a4f8ecf00d5e030dfead9222d2185'/>
<id>urn:sha1:782b07e1ff4a4f8ecf00d5e030dfead9222d2185</id>
<content type='text'>
Co-authored-by: Jonas Böttiger &lt;jonasboettiger@icloud.com&gt;
</content>
</entry>
<entry>
<title>fix memory ordering bug + bad test</title>
<updated>2024-11-16T17:31:14+00:00</updated>
<author>
<name>Connor Tsui</name>
<email>connor.tsui20@gmail.com</email>
</author>
<published>2024-11-08T23:13:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=84fd95cbedf1e1c1826e378ffc4d1a3d335deff4'/>
<id>urn:sha1:84fd95cbedf1e1c1826e378ffc4d1a3d335deff4</id>
<content type='text'>
This commit fixes a memory ordering bug in the futex implementation
(`Relaxed` -&gt; `Release` on `downgrade`).

This commit also removes a badly written test that deadlocked and
replaces it with a more reasonable test based on an already-tested
`downgrade` test from the parking-lot crate.
</content>
</entry>
<entry>
<title>add safety comments for queue implementation</title>
<updated>2024-11-16T17:31:13+00:00</updated>
<author>
<name>Connor Tsui</name>
<email>connor.tsui20@gmail.com</email>
</author>
<published>2024-10-29T00:02:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3d191b50d2b5a4b17eda2f8cccaa5088ef56b8af'/>
<id>urn:sha1:3d191b50d2b5a4b17eda2f8cccaa5088ef56b8af</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add `downgrade` to `queue` implementation</title>
<updated>2024-11-16T17:31:13+00:00</updated>
<author>
<name>Connor Tsui</name>
<email>connor.tsui20@gmail.com</email>
</author>
<published>2024-10-25T19:01:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=26b5a1485e60a1ea7fd7e638fd59ec6b25fbc3d0'/>
<id>urn:sha1:26b5a1485e60a1ea7fd7e638fd59ec6b25fbc3d0</id>
<content type='text'>
This commit adds the `downgrade` method onto the inner `RwLock` queue
implementation.

There are also a few other style patches included in this commit.

Co-authored-by: Jonas Böttiger &lt;jonasboettiger@icloud.com&gt;
</content>
</entry>
<entry>
<title>modify queue implementation documentation</title>
<updated>2024-11-16T17:31:13+00:00</updated>
<author>
<name>Connor Tsui</name>
<email>connor.tsui20@gmail.com</email>
</author>
<published>2024-10-25T18:54:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=31e35c2131f0b71a7d2cdc3b515d1a22f5f3b61d'/>
<id>urn:sha1:31e35c2131f0b71a7d2cdc3b515d1a22f5f3b61d</id>
<content type='text'>
This commit only has documentation changes and a few things moved around
the file. The very few code changes are cosmetic: changes like turning a
`match` statement into an `if let` statement or reducing indentation for
long if statements.

This commit also adds several safety comments on top of `unsafe` blocks
that might not be immediately obvious to a first-time reader.

Code "changes" are in:
- `add_backlinks_and_find_tail`
- `lock_contended`

A majority of the changes are just expanding the comments from 80
columns to 100 columns.
</content>
</entry>
<entry>
<title>add `downgrade` to `futex` implementation</title>
<updated>2024-11-16T17:31:13+00:00</updated>
<author>
<name>Connor Tsui</name>
<email>connor.tsui20@gmail.com</email>
</author>
<published>2024-10-16T13:41:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fa9f04af5db346847295b10142fffde38dab6169'/>
<id>urn:sha1:fa9f04af5db346847295b10142fffde38dab6169</id>
<content type='text'>
</content>
</entry>
</feed>
