diff options
author | Rich Felker <dalias@aerifal.cx> | 2015-04-10 00:54:48 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-04-10 00:54:48 -0400 |
commit | 4e98cce1c529a304d7b55b5455078b9532f93e9b (patch) | |
tree | a824ce64116146e20de6264fe4e91405fd1a2124 /src/thread/pthread_create.c | |
parent | 12e1e324683a1d381b7f15dd36c99b37dd44d940 (diff) | |
download | musl-4e98cce1c529a304d7b55b5455078b9532f93e9b.tar.gz musl-4e98cce1c529a304d7b55b5455078b9532f93e9b.tar.xz musl-4e98cce1c529a304d7b55b5455078b9532f93e9b.zip |
optimize out setting up robust list with kernel when not needed
as a result of commit 12e1e324683a1d381b7f15dd36c99b37dd44d940, kernel processing of the robust list is only needed for process-shared mutexes. previously the first attempt to lock any owner-tracked mutex resulted in robust list initialization and a set_robust_list syscall. this is no longer necessary, and since the kernel's record of the robust list must now be cleared at thread exit time for detached threads, optimizing it out is more worthwhile than before too.
Diffstat (limited to 'src/thread/pthread_create.c')
-rw-r--r-- | src/thread/pthread_create.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c index 893773fa..8b0135bc 100644 --- a/src/thread/pthread_create.c +++ b/src/thread/pthread_create.c @@ -268,6 +268,7 @@ int __pthread_create(pthread_t *restrict res, const pthread_attr_t *restrict att do_sched = new->startlock[0] = 1; __block_app_sigs(new->sigmask); } + new->robust_list.head = &new->robust_list.head; new->unblock_cancel = self->cancel; new->canary = self->canary; |