You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@teaclave.apache.org by rd...@apache.org on 2021/12/31 04:54:56 UTC
[incubator-teaclave-sgx-sdk] branch master updated: fix unread_lock bug
This is an automated email from the ASF dual-hosted git repository.
rduan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-sgx-sdk.git
The following commit(s) were added to refs/heads/master by this push:
new 565960c fix unread_lock bug
565960c is described below
commit 565960cd7b4b36d1188459d75652619971c43f7e
Author: volcano <vo...@163.com>
AuthorDate: Fri Dec 31 12:53:45 2021 +0800
fix unread_lock bug
---
sgx_tstd/src/sys/rwlock.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sgx_tstd/src/sys/rwlock.rs b/sgx_tstd/src/sys/rwlock.rs
index c5056ca..02989e0 100644
--- a/sgx_tstd/src/sys/rwlock.rs
+++ b/sgx_tstd/src/sys/rwlock.rs
@@ -161,7 +161,7 @@ impl SgxThreadRwLockInner {
self.reader_count -= 1;
if self.reader_count == 0 {
- let waiter = self.reader_queue.front();
+ let waiter = self.writer_queue.front();
self.lock.unlock();
if let Some(td) = waiter {
mutex::thread_set_event(SgxThreadData::from_raw(*td).get_tcs());
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org