Commit Graph

10 Commits

Author SHA1 Message Date
riastradh 568eb77ef2 pthread: Nix trailing whitespace. 2022-04-10 10:38:33 +00:00
riastradh 7adb41074d libpthread: Move namespacing include to top of .c files.
Stuff like libc's namespace.h, or atomic_op_namespace.h, which does
namespacing tricks like `#define atomic_cas_uint _atomic_cas_uint',
has to go at the top of each .c file.  If it goes in the middle, it
might be too late to affect the declarations, and result in compile
errors.

I tripped over this by including <sys/atomic.h> in mips
<machine/lock.h>.

(Maybe we should create a new pthread_namespace.h file for the
purpose, but this'll do for now.)
2022-02-12 14:59:32 +00:00
kamil 91719d9fbd Retire ifdef ERRORCHECK in pthread(3)
It is enabled unconditionally since 2003 and used only for rwlocks and
spinlocks.

LLVM sanitizers make assumptions that these checks are enabled always.
2020-02-05 11:05:10 +00:00
kamil 260b3a1721 Refactor libpthread checks for invalid arguments
Switch from manual functions to pthread__error().
2020-01-31 17:52:14 +00:00
matt 2f1e74f8c5 Add a pthread__smt_wake and add support for it on arm along with
pthread__smt_pause.  These are implemented using the ARM instructions
SEV (wake) and WFE (pause).  These are treated as NOPs on ARM CPUs that
don't support them.
2012-08-16 04:49:47 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
ad b43749fde1 machine/lock.h, not sys/lock.h 2008-01-05 01:37:35 +00:00
ad 15e9cec117 For PR bin/37347:
- Override __libc_thr_init() instead of using our own constructor.
- Add pthread__getenv() and use instead of getenv(). This is used before
  we are up and running and unfortunatley getenv() takes locks.

Other changes:

- Cache the spinlock vectors in pthread__st. Internal spinlock operations
  now take 1 function call instead of 3 (i386).
- Use pthread__self() internally, not pthread_self().
- Use __attribute__ ((visibility("hidden"))) in some places.
- Kill PTHREAD_MAIN_DEBUG.
2007-11-13 15:57:10 +00:00
skrll 9fdaf800d9 Merge nick-csl-alignment. 2007-09-10 11:34:05 +00:00
ad d9adedd764 Trim fat off libpthread internal spinlock operations. Makes a mesurable
improvement across the board.
2007-08-16 13:54:16 +00:00