aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-10 07:09:44 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-10 07:09:44 +0000
commitac80c9c085b211d19c4dcef7ed2fcace8d05aaa1 (patch)
tree5ea8d132ab05426361c61684f35300352fd05ad1
parenta23f645d3d2524f51b98fc655f40d37097ebe492 (diff)
parentf8343a39f7646c78e7080653ca833c6e20575e4a (diff)
downloadthread_local-ac80c9c085b211d19c4dcef7ed2fcace8d05aaa1.tar.gz
Change-Id: I49ec501c9327c50c234c3bd90722fa4a5f1e3f1a
-rw-r--r--.cargo_vcs_info.json7
-rw-r--r--Android.bp30
-rw-r--r--Cargo.toml11
-rw-r--r--Cargo.toml.orig2
-rw-r--r--METADATA10
-rw-r--r--TEST_MAPPING14
-rw-r--r--cargo2android.json5
-rw-r--r--src/lib.rs2
8 files changed, 37 insertions, 44 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index e9cf727..f17b5e4 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,6 @@
{
"git": {
- "sha1": "c7d8dcdf4b93a5d80ec4075c3d8e7351c1a32012"
- }
-}
+ "sha1": "4a54e5702e0968bdda77366738ba646f646044e8"
+ },
+ "path_in_vcs": ""
+} \ No newline at end of file
diff --git a/Android.bp b/Android.bp
index cd66abf..223fd47 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,4 @@
-// This file is generated by cargo2android.py --run --device --dependencies --tests.
+// This file is generated by cargo2android.py --config cargo2android.json.
// Do not modify this file as changes will be overridden on upgrade.
package {
@@ -41,6 +41,8 @@ rust_library {
name: "libthread_local",
host_supported: true,
crate_name: "thread_local",
+ cargo_env_compat: true,
+ cargo_pkg_version: "1.1.4",
srcs: ["src/lib.rs"],
edition: "2018",
rustlibs: [
@@ -48,30 +50,20 @@ rust_library {
],
}
-rust_defaults {
- name: "thread_local_defaults",
+rust_test {
+ name: "thread_local_test_src_lib",
+ host_supported: true,
crate_name: "thread_local",
+ cargo_env_compat: true,
+ cargo_pkg_version: "1.1.4",
srcs: ["src/lib.rs"],
test_suites: ["general-tests"],
auto_gen_config: true,
+ test_options: {
+ unit_test: true,
+ },
edition: "2018",
rustlibs: [
"libonce_cell",
],
}
-
-rust_test_host {
- name: "thread_local_host_test_src_lib",
- defaults: ["thread_local_defaults"],
- test_options: {
- unit_test: true,
- },
-}
-
-rust_test {
- name: "thread_local_device_test_src_lib",
- defaults: ["thread_local_defaults"],
-}
-
-// dependent_library ["feature_list"]
-// once_cell-1.7.2 "alloc,default,race,std"
diff --git a/Cargo.toml b/Cargo.toml
index 3e76c4c..90e5319 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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 = "thread_local"
-version = "1.1.3"
+version = "1.1.4"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Per-object thread-local storage"
documentation = "https://docs.rs/thread_local/"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index a56288f..f2e8ff0 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "thread_local"
-version = "1.1.3"
+version = "1.1.4"
authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
description = "Per-object thread-local storage"
documentation = "https://docs.rs/thread_local/"
diff --git a/METADATA b/METADATA
index ef2ed7c..4c77c6a 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/thread_local/thread_local-1.1.3.crate"
+ value: "https://static.crates.io/crates/thread_local/thread_local-1.1.4.crate"
}
- version: "1.1.3"
+ version: "1.1.4"
license_type: NOTICE
last_upgrade_date {
- year: 2021
- month: 2
- day: 9
+ year: 2022
+ month: 3
+ day: 1
}
}
diff --git a/TEST_MAPPING b/TEST_MAPPING
index f53788f..7974396 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -2,16 +2,12 @@
{
"presubmit": [
{
- "name": "keystore2_test"
- },
- {
- "name": "thread_local_device_test_src_lib"
- },
- {
- "name": "libsqlite3-sys_device_test_src_lib"
- },
+ "name": "thread_local_test_src_lib"
+ }
+ ],
+ "presubmit-rust": [
{
- "name": "vpnprofilestore_test"
+ "name": "thread_local_test_src_lib"
}
]
}
diff --git a/cargo2android.json b/cargo2android.json
new file mode 100644
index 0000000..d36fb44
--- /dev/null
+++ b/cargo2android.json
@@ -0,0 +1,5 @@
+{
+ "device": true,
+ "run": true,
+ "tests": true
+} \ No newline at end of file
diff --git a/src/lib.rs b/src/lib.rs
index f26f6ed..33b79d6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -378,7 +378,7 @@ impl RawIter {
fn next<'a, T: Send + Sync>(&mut self, thread_local: &'a ThreadLocal<T>) -> Option<&'a T> {
while self.bucket < BUCKETS {
let bucket = unsafe { thread_local.buckets.get_unchecked(self.bucket) };
- let bucket = bucket.load(Ordering::Relaxed);
+ let bucket = bucket.load(Ordering::Acquire);
if !bucket.is_null() {
while self.index < self.bucket_size {