summaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018-05-09 00:33:54 -0400
committerRich Felker <dalias@aerifal.cx>2018-05-09 00:37:49 -0400
commit40bae2d32fd6f3ffea437fa745ad38a1fe77b27e (patch)
treea69ba86fa80860f0248778a782c0b18a226bc0c2 /src/internal
parentb8742f32602add243ee2ce74d804015463726899 (diff)
downloadmusl-40bae2d32fd6f3ffea437fa745ad38a1fe77b27e.tar.gz
make linking of thread-start with explicit scheduling conditional
the wrapper start function that performs scheduling operations is unreachable if pthread_attr_setinheritsched is never called, so move it there rather than the pthread_create source file, saving some code size for static-linked programs.
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/pthread_impl.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h
index 69352ef2..c2deffb9 100644
--- a/src/internal/pthread_impl.h
+++ b/src/internal/pthread_impl.h
@@ -56,6 +56,14 @@ struct pthread {
void **dtv_copy;
};
+struct start_sched_args {
+ void *start_arg;
+ void *(*start_fn)(void *);
+ sigset_t mask;
+ pthread_attr_t *attr;
+ volatile int futex;
+};
+
enum {
DT_EXITED = 0,
DT_EXITING,