1. 15 10月, 2011 1 次提交
  2. 10 10月, 2011 1 次提交
    • R
      fix F_GETOWN return value handling · 8e8ddeff
      Rich Felker 提交于
      the fcntl syscall can return a negative value when the command is
      F_GETOWN, and this is not an error code but an actual value. thus we
      must special-case it and avoid calling __syscall_ret to set errno.
      this fix is better than the glibc fix (using F_GETOWN_EX) which only
      works on newer kernels and is more complex.
      8e8ddeff
  3. 09 10月, 2011 1 次提交
  4. 05 10月, 2011 1 次提交
  5. 04 10月, 2011 1 次提交
  6. 03 10月, 2011 6 次提交
  7. 01 10月, 2011 6 次提交
  8. 29 9月, 2011 7 次提交
  9. 28 9月, 2011 13 次提交
  10. 27 9月, 2011 3 次提交
    • R
      fix ctype macros to cast argument to (unsigned) first · 7e14ed13
      Rich Felker 提交于
      issue reported by nsz, but it's actually not just pedantic. the
      functions can take input of any arithmetic type, including floating
      point, and the behavior needs to be as if the conversion implicit in
      the function call took place.
      7e14ed13
    • R
      another cond var fix: requeue count race condition · 3bec53e0
      Rich Felker 提交于
      lock out new waiters during the broadcast. otherwise the wait count
      added to the mutex might be lower than the actual number of waiters
      moved, and wakeups may be lost.
      
      this issue could also be solved by temporarily setting the mutex
      waiter count higher than any possible real count, then relying on the
      kernel to tell us how many waiters were requeued, and updating the
      counts afterwards. however the logic is more complex, and i don't
      really trust the kernel. the solution here is also nice in that it
      replaces some atomic cas loops with simple non-atomic ops under lock.
      3bec53e0
    • R
      fix lost signals in cond vars · 1fa05210
      Rich Felker 提交于
      due to moving waiters from the cond var to the mutex in bcast, these
      waiters upon wakeup would steal slots in the count from newer waiters
      that had not yet been signaled, preventing the signal function from
      taking any action.
      
      to solve the problem, we simply use two separate waiter counts, and so
      that the original "total" waiters count is undisturbed by broadcast
      and still available for signal.
      1fa05210