Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <f2bad7e008a1418dbcbba6fb8af2446c@huawei.com>
Date: Fri, 9 Aug 2024 03:21:23 +0000
From: guolongqiang <guolongqiang@...wei.com>
To: "musl@...ts.openwall.com" <musl@...ts.openwall.com>
CC: xufengwei <xufengwei@...wei.com>
Subject: questions about __tl_lock

Hi, all
         I have one question about __tl_lock. The current implementation of __tl_lock shown as follow.
Obviously __thread_list_lock is a private memory, why don't we pass FUTEX_PRIVATE option to __wait?

```
void __tl_lock(void)
{
int tid = __pthread_self()->tid;
int val = __thread_list_lock;
if (val == tid) {
tl_lock_count++;
return;
}
while ((val = a_cas(&__thread_list_lock, 0, tid)))
__wait(&__thread_list_lock, &tl_lock_waiters, val, 0);
}
```
Thank you to explain.


Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.