1. 03 6月, 2012 3 次提交
  2. 01 6月, 2012 2 次提交
    • R
      add LSB ABI __xstat, etc. junk · 9ea20dcb
      Rich Felker 提交于
      9ea20dcb
    • R
      enable LARGEFILE64 aliases · a5412976
      Rich Felker 提交于
      these will NOT be used when compiling with -D_LARGEFILE64_SOURCE on
      musl; instead, they exist in the hopes of eventually being able to run
      some glibc-linked apps with musl sitting in place of glibc.
      
      also remove the (apparently incorrect) fcntl alias.
      a5412976
  3. 31 5月, 2012 1 次提交
  4. 29 5月, 2012 4 次提交
  5. 28 5月, 2012 2 次提交
    • R
      5c1909a8
    • R
      cleanup dynamic linker start code cruft · b94608ca
      Rich Felker 提交于
      two actual issues: one is that __dynlink no longer wants/needs a GOT
      pointer argument, so the code to generate that argument can be
      removed. the other issue was that in the i386 code, argc/argv were
      being loaded into registers that would be call-clobbered, then copied
      to preserved registers, rather than just being loaded into the proper
      call-preserved registers to begin with.
      
      this cleanup is in preparation for adding new dynamic linker
      functionality (ability to explicitly invoke the dynamic linker to run
      a program).
      b94608ca
  6. 27 5月, 2012 3 次提交
  7. 26 5月, 2012 2 次提交
    • R
      avoid using pthread cleanup push/pop in stdio when not needed · 3f25354e
      Rich Felker 提交于
      unfortunately in dynamic-linked programs, these macros cause
      pthread_self to be initialized, which costs a couple syscalls, and
      (much worse) would necessarily fail, crash, and burn on ancient (2.4
      and earlier) kernels where setting up a thread pointer does not work.
      
      i'd like to do this in a more generic way that avoids all use of
      cleanup push/pop before pthread_self has been successfully called and
      avoids ugly if/else constructs like the one in this commit, but for
      now, this will suffice.
      3f25354e
    • R
      ensure pthread-internal signals are unblocked before threads are used · 8cce15af
      Rich Felker 提交于
      if the process started with these signals blocked, cancellation could
      fail or setxid could deadlock. there is no way to globally unblock
      them after threads have been created. by unblocking them in the
      pthread_self initialization for the main thread, we ensure that
      they're unblocked before any other threads are created and also
      outside of any signal handler context (sigaction initialized
      pthread_self), which is important so that return from a signal handler
      won't re-block them.
      8cce15af
  8. 25 5月, 2012 5 次提交
  9. 24 5月, 2012 4 次提交
    • R
      linux deprecated SYS_utime on some archs, so use SYS_utimes instead · c37afdfd
      Rich Felker 提交于
      the old code could be kept for cases where SYS_utime is available, but
      it's not really worth the ifdef ugliness. and better to avoid
      deprecated stuff just in case the kernel devs ever get crazy enough to
      start removing it from archs where it was part of the ABI and breaking
      static bins...
      c37afdfd
    • R
      fix bad opcode in arm syscall_cp_asm · 4d4f13e5
      Rich Felker 提交于
      4d4f13e5
    • R
      fix issue with longjmp out of signal handlers and cancellation · 4da268f7
      Rich Felker 提交于
      stale state information indicating that a thread was possibly blocked
      at a cancellation point could get left behind if longjmp was used to
      exit a signal handler that interrupted a cancellation point.
      
      to fix the issue, we throw away the state information entirely and
      simply compare the saved instruction pointer to a range of code
      addresses in the __syscall_cp_asm function. all the ugly PIC work
      (which becomes minimal anyway with this approach) is defered to
      cancellation time instead of happening at every syscall, which should
      improve performance too.
      
      this commit also fixes cancellation on arm, which was mildly broken
      (race condition, not checking cancellation flag once inside the
      cancellation point zone). apparently i forgot to implement that. the
      new arm code is untested, but appears correct; i'll test and fix it
      later if there are problems.
      4da268f7
    • R
      simplify cancellation push/pop slightly · cfd892fd
      Rich Felker 提交于
      no need to pass unnecessary extra arguments on to the core code in
      pthread_create.c. this just wastes cycles and code bloat.
      cfd892fd
  10. 23 5月, 2012 8 次提交
    • R
      debloat jmp_buf in _GNU_SOURCE mode · 25d575ed
      Rich Felker 提交于
      i originally made it the same size as the bloated GNU version, which
      contains space for saved signal mask, but this makes some structures
      containing jmp_buf become much larger for no benefit. we will never
      use the signal mask field with plain setjmp; sigsetjmp serves that
      purpose.
      25d575ed
    • R
      remove everything related to forkall · 0c29adfe
      Rich Felker 提交于
      i made a best attempt, but the intended semantics of this function are
      fundamentally contradictory. there is no consistent way to handle
      ownership of locks when forking a multi-threaded process. the code
      could have worked by accident for programs that only used normal
      mutexes and nothing else (since they don't actually store or care
      about their owner), but that's about it. broken-by-design interfaces
      that aren't even in glibc (only solaris) don't belong in musl.
      0c29adfe
    • R
      some feature test fixes for unistd.h · af3330d7
      Rich Felker 提交于
      af3330d7
    • R
      fix missing _BSD_SOURCE support in bits/*.h · 030b452b
      Rich Felker 提交于
      this is actually rather ugly, and would get even uglier if we ever
      want to support further feature test macros. at some point i may
      factor the bits headers into separate files for C base, POSIX base,
      and nonstandard extensions (the only distinctions that seem to matter
      now) and then the logic for which to include can go in the main header
      rather than being duplicated for each arch. the downside of this is
      that it would result in more files having to be opened during
      compilation, so as long as the ugliness does not grow, i'm inclined to
      leave it alone for now.
      030b452b
    • R
      96601e3c
    • R
      various header cleanups, some related to _BSD_SOURCE addition · 671ffab7
      Rich Felker 提交于
      there is no reason to avoid multiple identical macro definitions; this
      is perfectly legal C, and even with the maximal warning options
      enabled, gcc does not issue any warning for it.
      671ffab7
    • R
      bsd_signal is a legacy (removed) XSI function, not needed in _BSD_SOURCE · 9f370fa9
      Rich Felker 提交于
      its only purpose was for use on non-BSD systems that implement sysv
      semantics for signal() by default.
      9f370fa9
    • R
      support _BSD_SOURCE feature test macro · 419ae6d5
      Rich Felker 提交于
      patch by Isaac Dunham. matched closely (maybe not exact) to glibc's
      idea of what _BSD_SOURCE should make visible.
      419ae6d5
  11. 22 5月, 2012 2 次提交
  12. 21 5月, 2012 1 次提交
  13. 17 5月, 2012 1 次提交
  14. 15 5月, 2012 1 次提交
  15. 14 5月, 2012 1 次提交