diff options
author | Joel Galenson <jgalenson@google.com> | 2021-09-23 15:02:53 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-09-23 15:02:53 +0000 |
commit | b8fb64aeff1e50349030840e7c5561311623e9a9 (patch) | |
tree | a927b681c3d3d65f5d2671480185bf51bc1acfa4 | |
parent | 90c2f9437c7108cbd03efab6bb3f7ef86ae72764 (diff) | |
parent | bbc667884c8b4ee4e3a2f2dae7a3cf1f98080508 (diff) | |
download | parking_lot-b8fb64aeff1e50349030840e7c5561311623e9a9.tar.gz |
Upgrade rust/crates/parking_lot to 0.11.2 am: 875833a4c5 am: a31dc0fdc5 am: bbc667884c
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/parking_lot/+/1833578
Change-Id: Ifaa0599561a5500a974b419137f1e78c8a9fb0a4
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | .github/workflows/rust.yml | 8 | ||||
-rw-r--r-- | Android.bp | 15 | ||||
-rw-r--r-- | CHANGELOG.md | 28 | ||||
-rw-r--r-- | Cargo.toml | 22 | ||||
-rw-r--r-- | Cargo.toml.orig | 13 | ||||
-rw-r--r-- | METADATA | 10 | ||||
-rw-r--r-- | src/raw_rwlock.rs | 4 |
8 files changed, 62 insertions, 40 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index e1a0b04..58935f2 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,5 +1,5 @@ { "git": { - "sha1": "86969fd7baf94312520e0b5a5f3b0861a0fd411b" + "sha1": "18001b819c1539c06c176c671bbe54e70b5c3d69" } } diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d613089..39c8d2d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -16,11 +16,11 @@ jobs: strategy: matrix: os: [ubuntu, macos, windows] - channel: [1.36.0, stable, beta, nightly] - feature: [serde, deadlock_detection] + channel: [1.49.0, stable, beta, nightly] + feature: [arc_lock, serde, deadlock_detection] exclude: - feature: deadlock_detection - channel: '1.36.0' + channel: '1.49.0' include: - channel: nightly feature: nightly @@ -53,7 +53,7 @@ jobs: steps: - uses: actions/checkout@v2 - run: rustup default nightly - - run: cargo doc --workspace --features serde,deadlock_detection --no-deps -p parking_lot -p parking_lot_core -p lock_api + - run: cargo doc --workspace --features arc_lock,serde,deadlock_detection --no-deps -p parking_lot -p parking_lot_core -p lock_api benchmark: runs-on: ubuntu-latest steps: @@ -1,4 +1,5 @@ -// This file is generated by cargo2android.py --run --device --dependencies. +// This file is generated by cargo2android.py --run --device. +// Do not modify this file as changes will be overridden on upgrade. package { default_applicable_licenses: ["external_rust_crates_parking_lot_license"], @@ -40,6 +41,8 @@ rust_library { name: "libparking_lot", host_supported: true, crate_name: "parking_lot", + cargo_env_compat: true, + cargo_pkg_version: "0.11.2", srcs: ["src/lib.rs"], edition: "2018", features: ["default"], @@ -49,13 +52,3 @@ rust_library { "libparking_lot_core", ], } - -// dependent_library ["feature_list"] -// cfg-if-0.1.10 -// cfg-if-1.0.0 -// instant-0.1.8 -// libc-0.2.80 "default,std" -// lock_api-0.4.2 -// parking_lot_core-0.8.0 -// scopeguard-1.1.0 -// smallvec-1.5.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index a473463..5cd4e6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,31 @@ +## parking_lot 0.11.2, parking_lot_core 0.8.4, lock_api 0.4.5 (2021-08-28) + +- Fixed incorrect memory orderings on `RwLock` and `WordLock`. (#294, #292) +- Added `Arc`-based lock guards. (#291) +- Added workaround for TSan's lack of support for `fence`. (#292) + +## lock_api 0.4.4 (2021-05-01) + +- Update for latest nightly. (#281) + +## lock_api 0.4.3 (2021-04-03) + +- Added `[Raw]ReentrantMutex::is_owned`. (#280) + +## parking_lot_core 0.8.3 (2021-02-12) + +- Updated smallvec to 1.6. (#276) + +## parking_lot_core 0.8.2 (2020-12-21) + +- Fixed assertion failure on OpenBSD. (#270) + +## parking_lot_core 0.8.1 (2020-12-04) + +- Removed deprecated CloudABI support. (#263) +- Fixed build on wasm32-unknown-unknown. (#265) +- Relaxed dependency on `smallvec`. (#266) + ## parking_lot 0.11.1, lock_api 0.4.2 (2020-11-18) - Fix bounds on Send and Sync impls for lock guards. (#262) @@ -3,17 +3,16 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g., crates.io) dependencies +# to registry (e.g., crates.io) dependencies. # -# If you believe there's an error in this file please file an -# issue against the rust-lang/cargo repository. If you're -# editing this file be aware that the upstream Cargo.toml -# will likely look very different (and much more reasonable) +# If you are reading this file be aware that the original Cargo.toml +# will likely look very different (and much more reasonable). +# See Cargo.toml.orig for the original contents. [package] edition = "2018" name = "parking_lot" -version = "0.11.1" +version = "0.11.2" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synchronization primitives." readme = "README.md" @@ -22,20 +21,21 @@ categories = ["concurrency"] license = "Apache-2.0/MIT" repository = "https://github.com/Amanieu/parking_lot" [dependencies.instant] -version = "0.1.4" +version = "0.1.9" [dependencies.lock_api] -version = "0.4.0" +version = "0.4.5" [dependencies.parking_lot_core] -version = "0.8.0" +version = "0.8.4" [dev-dependencies.bincode] -version = "1.3.0" +version = "1.3.3" [dev-dependencies.rand] -version = "0.7.3" +version = "0.8.3" [features] +arc_lock = ["lock_api/arc_lock"] deadlock_detection = ["parking_lot_core/deadlock_detection"] default = [] nightly = ["parking_lot_core/nightly", "lock_api/nightly"] diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 67a2555..4c2518e 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "parking_lot" -version = "0.11.1" +version = "0.11.2" authors = ["Amanieu d'Antras <amanieu@gmail.com>"] description = "More compact and efficient implementations of the standard synchronization primitives." license = "Apache-2.0/MIT" @@ -11,18 +11,19 @@ categories = ["concurrency"] edition = "2018" [dependencies] -parking_lot_core = { path = "core", version = "0.8.0" } -lock_api = { path = "lock_api", version = "0.4.0" } -instant = "0.1.4" +parking_lot_core = { path = "core", version = "0.8.4" } +lock_api = { path = "lock_api", version = "0.4.5" } +instant = "0.1.9" [dev-dependencies] -rand = "0.7.3" +rand = "0.8.3" # Used when testing out serde support. -bincode = "1.3.0" +bincode = "1.3.3" [features] default = [] +arc_lock = ["lock_api/arc_lock"] owning_ref = ["lock_api/owning_ref"] nightly = ["parking_lot_core/nightly", "lock_api/nightly"] deadlock_detection = ["parking_lot_core/deadlock_detection"] @@ -7,13 +7,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/parking_lot/parking_lot-0.11.1.crate" + value: "https://static.crates.io/crates/parking_lot/parking_lot-0.11.2.crate" } - version: "0.11.1" + version: "0.11.2" license_type: NOTICE last_upgrade_date { - year: 2020 - month: 11 - day: 17 + year: 2021 + month: 9 + day: 22 } } diff --git a/src/raw_rwlock.rs b/src/raw_rwlock.rs index 75a9812..19b61c8 100644 --- a/src/raw_rwlock.rs +++ b/src/raw_rwlock.rs @@ -362,7 +362,7 @@ unsafe impl lock_api::RawRwLockUpgrade for RawRwLock { unsafe fn upgrade(&self) { let state = self.state.fetch_sub( (ONE_READER | UPGRADABLE_BIT) - WRITER_BIT, - Ordering::Relaxed, + Ordering::Acquire, ); if state & READERS_MASK != ONE_READER { let result = self.upgrade_slow(None); @@ -377,7 +377,7 @@ unsafe impl lock_api::RawRwLockUpgrade for RawRwLock { .compare_exchange_weak( ONE_READER | UPGRADABLE_BIT, WRITER_BIT, - Ordering::Relaxed, + Ordering::Acquire, Ordering::Relaxed, ) .is_ok() |