#
5670b8cc |
| 24-Jul-2024 |
Michal Meloun <mmel@FreeBSD.org> |
libthr: Preresolve selected EABI symbols on arm.
Add the ability to pre-resolve architecture-specific EABI symbols and use it on arm for selected EABI functions. These functions can be called with r
libthr: Preresolve selected EABI symbols on arm.
Add the ability to pre-resolve architecture-specific EABI symbols and use it on arm for selected EABI functions. These functions can be called with rtld bind lock write-locked, so they should be resolved in forward.
Reported by: Mark Millard <marklmi@yahoo.com>, John F Carr <jfc@mit.edu> Reviewed by: kib, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46104
show more ...
|
#
657b1276 |
| 03-Jul-2024 |
Ryan Libby <rlibby@FreeBSD.org> |
libthr _get_curthread amd64: quiet gcc -Warray-bounds
Use a constant input operand instead of a bogus memory reference to tell the compiler about offsetof(struct tcb, tcb_thread) in the fs segment.
libthr _get_curthread amd64: quiet gcc -Warray-bounds
Use a constant input operand instead of a bogus memory reference to tell the compiler about offsetof(struct tcb, tcb_thread) in the fs segment. Otherwise gcc complains if we tell it we are reading memory offset 0x10.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45828
show more ...
|
Revision tags: release/14.1.0, release/13.3.0 |
|
#
ef9871c6 |
| 17-Jan-2024 |
Brooks Davis <brooks@FreeBSD.org> |
libthr: move _umtx_op_err() to libsys
Declare in sys/umtx.h and implement in libsys. Explicitly link libthr with libsys.
When building libthr static include _umtx_op_err so we don't break static l
libthr: move _umtx_op_err() to libsys
Declare in sys/umtx.h and implement in libsys. Explicitly link libthr with libsys.
When building libthr static include _umtx_op_err so we don't break static linkage with -lpthread.
Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908
show more ...
|
Revision tags: release/14.0.0 |
|
#
b3e76948 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
c7904405 |
| 07-Apr-2022 |
Andrew Turner <andrew@FreeBSD.org> |
Remove PAGE_SIZE from libthr
In libthr we use PAGE_SIZE when allocating memory with mmap and to check various structs will fit into a single page so we can use this allocator for them.
Ask the kern
Remove PAGE_SIZE from libthr
In libthr we use PAGE_SIZE when allocating memory with mmap and to check various structs will fit into a single page so we can use this allocator for them.
Ask the kernel for the page size on init for use by the page allcator and add a new machine dependent macro to hold the smallest page size the architecture supports to check the structure is small enough.
This allows us to use the same libthr on arm64 with either 4k or 16k pages.
Reviewed by: kib, markj, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34984
show more ...
|
#
75395023 |
| 09-Dec-2021 |
John Baldwin <jhb@FreeBSD.org> |
libthr: Use <machine/tls.h> for most MD TLS details.
Note that on amd64 this effectively removes the unused tcb_spare field from the end of struct tcb since the definition of struct tcb in <x86/tls.
libthr: Use <machine/tls.h> for most MD TLS details.
Note that on amd64 this effectively removes the unused tcb_spare field from the end of struct tcb since the definition of struct tcb in <x86/tls.h> does not include that field.
Reviewed by: kib, jrtc27 Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33352
show more ...
|
#
5d817633 |
| 09-Dec-2021 |
John Baldwin <jhb@FreeBSD.org> |
libthr: Remove the DTV_OFFSET macro.
This macro is confusing as it is not related to the similarly named TLS_DTV_OFFSET. Instead, replace its one use with the desired expression which is the same o
libthr: Remove the DTV_OFFSET macro.
This macro is confusing as it is not related to the similarly named TLS_DTV_OFFSET. Instead, replace its one use with the desired expression which is the same on all platforms.
Reviewed by: kib, emaste, jrtc27 Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33345
show more ...
|
Revision tags: release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0 |
|
#
5e53a4f9 |
| 26-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
lib: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using mis-identified many licenses so this was mostly a manual - error pr
lib: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using mis-identified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
show more ...
|
Revision tags: release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0, release/10.3.0, release/10.2.0 |
|
#
98e0ffae |
| 27-May-2015 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge sync of head
|
#
9f3d45b6 |
| 08-Feb-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from HEAD
|
#
47712954 |
| 26-Jan-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r277327 through r277718.
|
#
57de838f |
| 23-Jan-2015 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead @ r277555
|
#
20fe2c94 |
| 21-Jan-2015 |
Andrew Turner <andrew@FreeBSD.org> |
Merge all the copies of _tcb_ctor and _tcb_dtor.
The amd64, i386, and sparc64 versions were identical, with the one difference where the former two used inline asm instead of _tcb_get. I have compar
Merge all the copies of _tcb_ctor and _tcb_dtor.
The amd64, i386, and sparc64 versions were identical, with the one difference where the former two used inline asm instead of _tcb_get. I have compared the function before and after replacing the asm with _tcb_get and found the object files to be identical.
The arm, mips, and powerpc versions were almost identical. The only difference was the powerpc version used an alignment of 1 where arm and mips used 16. As this is an increase in alignment is will be safe.
Along with this arm, mips, and powerpc all passed, when initial was true, the value returned from _tcb_get as the first argument to _rtld_allocate_tls. This would then return this pointer back to the caller. We can remove these extra calls by checking if initial is set and setting the thread control block directly. As this is what the sparc64 code does we can use it directly.
As after these observations all the architectures can now have identical code we can merge them into a common file.
Differential Revision: https://reviews.freebsd.org/D1556 Reviewed by: kib Sponsored by: The FreeBSD Foundation
show more ...
|
Revision tags: release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0, release/8.3.0_cvs, release/8.3.0 |
|
#
8fa0b743 |
| 23-Jan-2012 |
Xin LI <delphij@FreeBSD.org> |
IFC @230489 (pending review).
|
#
80dbff4e |
| 04-Jan-2012 |
Sean Bruno <sbruno@FreeBSD.org> |
IFC to head to catch up the bhyve branch
Approved by: grehan@
|
Revision tags: release/9.0.0 |
|
#
b34d83a7 |
| 15-Dec-2011 |
Dimitry Andric <dim@FreeBSD.org> |
The TCB_GET32() and TCB_GET64() macros in the i386 and amd64-specific versions of pthread_md.h have a special case of dereferencing a null pointer. Clang warns about this with:
In file included fro
The TCB_GET32() and TCB_GET64() macros in the i386 and amd64-specific versions of pthread_md.h have a special case of dereferencing a null pointer. Clang warns about this with:
In file included from lib/libthr/arch/i386/i386/pthread_md.c:36: lib/libthr/arch/i386/include/pthread_md.h:96:10: error: indirection of non-volatile null pointer will be deleted, not trap [-Werror,-Wnull-dereference] return (TCB_GET32(tcb_self)); ^~~~~~~~~~~~~~~~~~~ lib/libthr/arch/i386/include/pthread_md.h:73:13: note: expanded from: : "m" (*(u_int *)(__tcb_offset(name)))); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/libthr/arch/i386/include/pthread_md.h:96:10: note: consider using __builtin_trap() or qualifying pointer with 'volatile'
Since this indirection is done relative to the fs or gs segment, to retrieve thread-specific data, it is an exception to the rule.
Therefore, add a volatile qualifier to tell the compiler we really want to dereference a zero address.
MFC after: 1 week
show more ...
|
Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0 |
|
#
d6e0eb0a |
| 02-Apr-2008 |
David Xu <davidxu@FreeBSD.org> |
Replace function _umtx_op with _umtx_op_err, the later function directly returns errno, because errno can be mucked by user's signal handler and most of pthread api heavily depends on errno to be cor
Replace function _umtx_op with _umtx_op_err, the later function directly returns errno, because errno can be mucked by user's signal handler and most of pthread api heavily depends on errno to be correct, this change should improve stability of the thread library.
show more ...
|
Revision tags: release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0 |
|
#
d99f6dac |
| 15-Dec-2006 |
David Xu <davidxu@FreeBSD.org> |
- Remove variable _thr_scope_system, all threads are system scope. - Rename _thr_smp_cpus to boolean variable _thr_is_smp. - Define CPU_SPINWAIT macro for each arch, only X86 supports it.
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0 |
|
#
b7e118b1 |
| 04-Apr-2006 |
David Xu <davidxu@FreeBSD.org> |
Remove declaration of _thr_initial from MD header file, it is no longer needed.
|
#
7bd76178 |
| 04-Apr-2006 |
David Xu <davidxu@FreeBSD.org> |
Simplify _get_curthread() and _tcb_ctor because libc and rtld now already allocate thread pointer space in tls block for initial thread. Only i386 and amd64 have been done, others still have to be te
Simplify _get_curthread() and _tcb_ctor because libc and rtld now already allocate thread pointer space in tls block for initial thread. Only i386 and amd64 have been done, others still have to be tested.
show more ...
|
Revision tags: release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0 |
|
#
a091d823 |
| 02-Apr-2005 |
David Xu <davidxu@FreeBSD.org> |
Import my recent 1:1 threading working. some features improved includes: 1. fast simple type mutex. 2. __thread tls works. 3. asynchronous cancellation works ( using signal ). 4. thread synchroni
Import my recent 1:1 threading working. some features improved includes: 1. fast simple type mutex. 2. __thread tls works. 3. asynchronous cancellation works ( using signal ). 4. thread synchronization is fully based on umtx, mainly, condition variable and other synchronization objects were rewritten by using umtx directly. those objects can be shared between processes via shared memory, it has to change ABI which does not happen yet. 5. default stack size is increased to 1M on 32 bits platform, 2M for 64 bits platform. As the result, some mysql super-smack benchmarks show performance is improved massivly.
Okayed by: jeff, mtm, rwatson, scottl
show more ...
|
Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0 |
|
#
d6e0eb0a |
| 02-Apr-2008 |
David Xu <davidxu@FreeBSD.org> |
Replace function _umtx_op with _umtx_op_err, the later function directly returns errno, because errno can be mucked by user's signal handler and most of pthread api heavily depends on errno to be cor
Replace function _umtx_op with _umtx_op_err, the later function directly returns errno, because errno can be mucked by user's signal handler and most of pthread api heavily depends on errno to be correct, this change should improve stability of the thread library.
show more ...
|
Revision tags: release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0 |
|
#
d99f6dac |
| 15-Dec-2006 |
David Xu <davidxu@FreeBSD.org> |
- Remove variable _thr_scope_system, all threads are system scope. - Rename _thr_smp_cpus to boolean variable _thr_is_smp. - Define CPU_SPINWAIT macro for each arch, only X86 supports it.
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0 |
|
#
b7e118b1 |
| 04-Apr-2006 |
David Xu <davidxu@FreeBSD.org> |
Remove declaration of _thr_initial from MD header file, it is no longer needed.
|