From 40bae2d32fd6f3ffea437fa745ad38a1fe77b27e Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 9 May 2018 00:33:54 -0400 Subject: 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. --- src/internal/pthread_impl.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/internal/pthread_impl.h') 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, -- cgit v1.2.1