1. 09 9月, 2012 4 次提交
    • R
      disable sync_file_range for now · 41c5ee50
      Rich Felker 提交于
      something is wrong with the logic for the argument layout, resulting
      in compile errors on mips due to too many args to syscall... further
      information on how it's supposed to work will be needed before it can
      be reactivated.
      41c5ee50
    • R
      syscall organization overhaul · 208eb584
      Rich Felker 提交于
      now public syscall.h only exposes __NR_* and SYS_* constants and the
      variadic syscall function. no macros or inline functions, no
      __syscall_ret or other internal details, no 16-/32-bit legacy syscall
      renaming, etc. this logic has all been moved to src/internal/syscall.h
      with the arch-specific parts in arch/$(ARCH)/syscall_arch.h, and the
      amount of arch-specific stuff has been reduced to a minimum.
      
      changes still need to be reviewed/double-checked. minimal testing on
      i386 and mips has already been performed.
      208eb584
    • R
      fe026040
    • R
      add acct, accept4, setns, and dup3 syscalls (linux extensions) · 6cf8bfdb
      Rich Felker 提交于
      based on patch by Justin Cormack
      6cf8bfdb
  2. 08 9月, 2012 7 次提交
  3. 07 9月, 2012 9 次提交
    • R
      cleanup src/linux and src/misc trees, etc. · b9bb8f67
      Rich Felker 提交于
      previously, it was pretty much random which one of these trees a given
      function appeared in. they have now been organized into:
      
      src/linux: non-POSIX linux syscalls (possibly shard with other nixen)
      src/legacy: various obsolete/legacy functions, mostly wrappers
      src/misc: still mostly uncategorized; some misc POSIX, some nonstd
      src/crypt: crypt hash functions
      
      further cleanup will be done later.
      b9bb8f67
    • R
      fix constraint violation in ftw · 780aede4
      Rich Felker 提交于
      void* does not implicitly convert to function pointer types.
      780aede4
    • R
      further use of _Noreturn, for non-plain-C functions · 0c05bd3a
      Rich Felker 提交于
      note that POSIX does not specify these functions as _Noreturn, because
      POSIX is aligned with C99, not the new C11 standard. when POSIX is
      eventually updated to C11, it will almost surely give these functions
      the _Noreturn attribute. for now, the actual _Noreturn keyword is not
      used anyway when compiling with a c99 compiler, which is what POSIX
      requires; the GCC __attribute__ is used instead if it's available,
      however.
      
      in a few places, I've added infinite for loops at the end of _Noreturn
      functions to silence compiler warnings. presumably
      __buildin_unreachable could achieve the same thing, but it would only
      work on newer GCCs and would not be portable. the loops should have
      near-zero code size cost anyway.
      
      like the previous _Noreturn commit, this one is based on patches
      contributed by philomath.
      0c05bd3a
    • R
      45305957
    • R
      c8ea9857
    • R
      use restrict everywhere it's required by c99 and/or posix 2008 · 400c5e5c
      Rich Felker 提交于
      to deal with the fact that the public headers may be used with pre-c99
      compilers, __restrict is used in place of restrict, and defined
      appropriately for any supported compiler. we also avoid the form
      [restrict] since older versions of gcc rejected it due to a bug in the
      original c99 standard, and instead use the form *restrict.
      400c5e5c
    • R
      remove dependency of wmemmove on wmemcpy direction · bac03cdd
      Rich Felker 提交于
      unlike the memmove commit, this one should be fine to leave in place.
      wmemmove is not performance-critical, and even if it were, it's
      already copying whole 32-bit words at a time instead of bytes.
      bac03cdd
    • R
      remove dependency of memmove on memcpy direction · 594318fd
      Rich Felker 提交于
      this commit introduces a performance regression in many uses of
      memmove, which will need to be addressed before the next release. i'm
      making it as a temporary measure so that the restrict patch can be
      committed without invoking undefined behavior when memmove calls
      memcpy with overlapping regions.
      594318fd
    • R
      fcfba995
  4. 30 8月, 2012 4 次提交
  5. 27 8月, 2012 2 次提交
  6. 26 8月, 2012 7 次提交
  7. 24 8月, 2012 1 次提交
  8. 20 8月, 2012 1 次提交
  9. 19 8月, 2012 1 次提交
    • R
      make dynamic linker report all failures before exiting · 04109502
      Rich Felker 提交于
      before, only the first library that failed to load or symbol that
      failed to resolve was reported, and then the dynamic linker
      immediately exited. when attempting to fix a library compatibility
      issue, this is about the worst possible behavior. now we print all
      errors as they occur and exit at the very end if errors were
      encountered.
      04109502
  10. 18 8月, 2012 3 次提交
    • R
      efe97514
    • R
      fix extremely rare but dangerous race condition in robust mutexes · da8d0fc4
      Rich Felker 提交于
      if new shared mappings of files/devices/shared memory can be made
      between the time a robust mutex is unlocked and its subsequent removal
      from the pending slot in the robustlist header, the kernel can
      inadvertently corrupt data in the newly-mapped pages when the process
      terminates. i am fixing the bug by using the same global vm lock
      mechanism that was used to fix the race condition with unmapping
      barriers after pthread_barrier_wait returns.
      da8d0fc4
    • R
      fix float parsing logic for long decimal expansions · 11458e5b
      Rich Felker 提交于
      this affects at least the case of very long inputs, but may also
      affect shorter inputs that become long due to growth while upscaling.
      basically, the logic for the circular buffer indices of the initial
      base-10^9 digit and the slot one past the final digit, and for
      simplicity of the loop logic, assumes an invariant that they're not
      equal. the upscale loop, which can increase the length of the
      base-10^9 representation, attempted to preserve this invariant, but
      was actually only ensuring that the end index did not loop around past
      the start index, not that the two never become equal.
      
      the main (only?) effect of this bug was that subsequent logic treats
      the excessively long number as having no digits, leading to junk
      results.
      11458e5b
  11. 16 8月, 2012 1 次提交