1. 25 3月, 2011 4 次提交
    • R
      optimize contended case for pthread_spin_trylock · b8b85a42
      Rich Felker 提交于
      b8b85a42
    • R
      optimize spinlock spin · c322fe4e
      Rich Felker 提交于
      c322fe4e
    • R
      fix non-atomicity of puts · 8ae2fa65
      Rich Felker 提交于
      8ae2fa65
    • R
      overhaul cancellation to fix resource leaks and dangerous behavior with signals · b470030f
      Rich Felker 提交于
      this commit addresses two issues:
      
      1. a race condition, whereby a cancellation request occurring after a
      syscall returned from kernelspace but before the subsequent
      CANCELPT_END would cause cancellable resource-allocating syscalls
      (like open) to leak resources.
      
      2. signal handlers invoked while the thread was blocked at a
      cancellation point behaved as if asynchronous cancellation mode wer in
      effect, resulting in potentially dangerous state corruption if a
      cancellation request occurs.
      
      the glibc/nptl implementation of threads shares both of these issues.
      
      with this commit, both are fixed. however, cancellation points
      encountered in a signal handler will not be acted upon if the signal
      was received while the thread was already at a cancellation point.
      they will of course be acted upon after the signal handler returns, so
      in real-world usage where signal handlers quickly return, it should
      not be a problem. it's possible to solve this problem too by having
      sigaction() wrap all signal handlers with a function that uses a
      pthread_cleanup handler to catch cancellation, patch up the saved
      context, and return into the cancellable function that will catch and
      act upon the cancellation. however that would be a lot of complexity
      for minimal if any benefit...
      b470030f
  2. 24 3月, 2011 1 次提交
  3. 20 3月, 2011 8 次提交
  4. 19 3月, 2011 2 次提交
  5. 18 3月, 2011 9 次提交
  6. 17 3月, 2011 2 次提交
  7. 16 3月, 2011 3 次提交
  8. 14 3月, 2011 2 次提交
  9. 13 3月, 2011 3 次提交
  10. 12 3月, 2011 2 次提交
  11. 11 3月, 2011 4 次提交