1. 09 11月, 2012 1 次提交
    • R
      clean up sloppy nested inclusion from pthread_impl.h · efd4d87a
      Rich Felker 提交于
      this mirrors the stdio_impl.h cleanup. one header which is not
      strictly needed, errno.h, is left in pthread_impl.h, because since
      pthread functions return their error codes rather than using errno,
      nearly every single pthread function needs the errno constants.
      
      in a few places, rather than bringing in string.h to use memset, the
      memset was replaced by direct assignment. this seems to generate much
      better code anyway, and makes many functions which were previously
      non-leaf functions into leaf functions (possibly eliminating a great
      deal of bloat on some platforms where non-leaf functions require ugly
      prologue and/or epilogue).
      efd4d87a
  2. 07 8月, 2011 1 次提交
  3. 17 7月, 2011 1 次提交
  4. 21 4月, 2011 1 次提交
    • R
      fix minor bugs due to incorrect threaded-predicate semantics · 870cc679
      Rich Felker 提交于
      some functions that should have been testing whether pthread_self()
      had been called and initialized the thread pointer were instead
      testing whether pthread_create() had been called and actually made the
      program "threaded". while it's unlikely any mismatch would occur in
      real-world problems, this could have introduced subtle bugs. now, we
      store the address of the main thread's thread descriptor in the libc
      structure and use its presence as a flag that the thread register is
      initialized. note that after fork, the calling thread (not necessarily
      the original main thread) is the new main thread.
      870cc679
  5. 18 4月, 2011 1 次提交
  6. 13 4月, 2011 1 次提交
    • R
      speed up threaded fork · e2915eee
      Rich Felker 提交于
      after fork, we have a new process and the pid is equal to the tid of
      the new main thread. there is no need to make two separate syscalls to
      obtain the same number.
      e2915eee
  7. 20 3月, 2011 1 次提交
  8. 10 3月, 2011 1 次提交
  9. 19 2月, 2011 1 次提交
    • R
      add pthread_atfork interface · e9417fff
      Rich Felker 提交于
      note that this presently does not handle consistency of the libc's own
      global state during forking. as per POSIX 2008, if the parent process
      was threaded, the child process may only call async-signal-safe
      functions until one of the exec-family functions is called, so the
      current behavior is believed to be conformant even if non-ideal. it
      may be improved at some later time.
      e9417fff
  10. 12 2月, 2011 1 次提交