| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
This matches the type in other unwind headers.
Reviewed by: dim, emaste
Differential Revision: https://reviews.freebsd.org/D34050
(cherry picked from commit 3a502289d316f726fec24087012fabb06313a2bf)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This matches the type in other unwind headers (LLVM libunwind,
libcxxrt, glibc).
NB: include/unwind.h is not installed but is only used by libthr
Reviewed by: imp, dim, emaste
Differential Revision: https://reviews.freebsd.org/D34049
(cherry picked from commit b84693501af6521487327ec4eb7c6ae0097ac5d7)
|
| |
|
|
| |
(cherry picked from commit f5b9747075a9b489226e2a911f8a1597f4b9d072)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
uses gcc 4.2.1 for mips, powerpc and sparc64.
Revert "Revert part of r360964"
This reverts commit 2ebf10e7a1ced5d3dc4059d0595743277464d915.
Revert "Remove tests for obsolete compilers in the build system"
This reverts commit a606cb388f975561c37dbabc2fee82c27ef09929.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Assume gcc is at least 6.4, the oldest xtoolchain in the ports tree.
Assume clang is at least 6, which was in 11.2-RELEASE. Drop conditions
for older compilers.
Reviewed by: imp (earlier version), emaste, jhb
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D24802
(cherry picked from commit fac6dee9eb58b2b558fec2aea749460ca623f6d6)
|
| |
|
|
|
|
| |
PR: 252579
(cherry picked from commit 85d028223bc2768651f4d44881644ceb5dc2a664)
|
| |
|
|
| |
(cherry picked from commit 21f749da82e755aafab127618affeffb86cff9a5)
|
| |
|
|
|
|
|
| |
Ensure that threading library is initialized in pthread_mutex_init().
Notes:
svn path=/stable/12/; revision=368401
|
| |
|
|
|
|
|
|
|
| |
libc: Add pthread_attr_get_np(3) stub, reporting ESRCH.
PR: 251112
Notes:
svn path=/stable/12/; revision=368361
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r367742:
_umtx_op: document UMTX_OP_SEM2_WAIT copyout behavior
This clever technique to get a time remaining back was added to support
sem_clockwait_np.
Reviewed by: kib, vangyzen
Differential Revision: https://reviews.freebsd.org/D27160
r367743:
_umtx_op: fix a compat32 bug in UMTX_OP_NWAKE_PRIVATE
Specifically, if we're waking up some value n > BATCH_SIZE, then the
copyin(9) is wrong on the second iteration due to upp being the wrong type.
upp is currently a uint32_t**, so upp + pos advances it by twice as many
elements as it should (host pointer size vs. compat32 pointer size).
Fix it by just making upp a uint32_t*; it's still technically a double
pointer, but the distinction doesn't matter all that much here since we're
just doing arithmetic on it.
Add a test case that demonstrates the problem, placed with the libthr tests
since one messing with _umtx_op should be running these tests. Running under
compat32, the new test case will hang as threads after the first 128 get
missed in the wake. it's not immediately clear how to hit it in practice,
since pthread_cond_broadcast() uses a smaller (sleepq batch?) size observed
to be around ~50 -- I did not spend much time digging into it.
The uintptr_t change makes no functional difference, but i've tossed it in
since it's more accurate (semantically).
Notes:
svn path=/stable/12/; revision=368325
|
| |
|
|
|
|
|
| |
Style.
Notes:
svn path=/stable/12/; revision=368144
|
| |
|
|
|
|
|
|
| |
Add pthread_getname_np() and pthread_setname_np() aliases for
pthread_get_name_np() and pthread_set_name_np().
Notes:
svn path=/stable/12/; revision=362264
|
| |
|
|
|
|
|
| |
Add pthread_peekjoin_np(3).
Notes:
svn path=/stable/12/; revision=358473
|
| |
|
|
|
|
|
|
| |
Return success, instead of ESRCH, from pthread_cancel(3) applied to the
exited but not yet joined thread.
Notes:
svn path=/stable/12/; revision=358140
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Leaf directories that have dependencies impacted
by options need a Makefile.depend.options file
to avoid churn in Makefile.depend
DIRDEPS for cases such as OPENSSL, TCP_WRAPPERS etc
can be set in local.dirdeps-options.mk
which can add to those set in Makefile.depend.options
See share/mk/dirdeps-options.mk
Also update affected Makefile.depend files.
MFC of r355616 and r355617
Reviewed by: bdrewery
Sponsored by: Juniper Networks
Differential Revision: https://reviews.freebsd.org/D22469
Notes:
svn path=/stable/12/; revision=355906
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RISC-V: Fix an alignment warning in libthr
Compiling with clang gives a loss-of-alignment error due the cast to
uint8_t *. Since the TLS is always tcb aligned and TP_OFFSET is defined
as sizeof(struct tcb) we can guarantee there is no misalignment. Silence
the error by moving the offset into the inline assembly.
Reviewed by: br
Differential Revision: https://reviews.freebsd.org/D21926
Notes:
svn path=/stable/12/; revision=354263
|
| |
|
|
|
|
|
| |
Fix destruction of the robust mutexes.
Notes:
svn path=/stable/12/; revision=352892
|
| |
|
|
|
|
|
|
|
| |
Fix _pthread_cancel_enter() and _pthread_cancel_leave() jmptable entries.
PR: 240022
Notes:
svn path=/stable/12/; revision=351451
|
| |
|
|
|
|
|
| |
Avoid conflicts with libc symbols in libthr jump table.
Notes:
svn path=/stable/12/; revision=351010
|
| |
|
|
|
|
|
|
|
|
| |
Restore ability to pass NULL name argument to pthread_set_name_np(3)
to clear the thread name.
PR: 239142
Notes:
svn path=/stable/12/; revision=349982
|
| |
|
|
|
|
|
|
|
| |
Add libc stub for pthread_getthreadid_np(3).
PR: 238650
Notes:
svn path=/stable/12/; revision=349679
|
| |
|
|
|
|
|
|
|
| |
Do not access mutex memory after unlock.
PR: 237195
Notes:
svn path=/stable/12/; revision=346371
|
| |
|
|
|
|
|
| |
Fix initial exec TLS mode for dynamically loaded shared objects.
Notes:
svn path=/stable/12/; revision=346155
|
| |
|
|
|
|
|
|
|
| |
Have pthread_cond_destroy() return EBUSY if the condvar has waiters.
PR: 234805
Notes:
svn path=/stable/12/; revision=345501
|
| |
|
|
|
|
|
|
|
|
|
| |
Untangle jemalloc and mutexes initialization.
The merge includes required warnings cleanup by arichardson, both to
avoid conflicts and to make rtld_malloc.c compilable with the libthr
WARNS settings.
Notes:
svn path=/stable/12/; revision=344011
|
| |
|
|
|
|
|
|
|
| |
No functional change.
X-MFC with: r337992
Notes:
svn path=/head/; revision=338125
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This basically adds makes use of the C99 restrict keyword, and also
adds some 'const's to four threading functions: pthread_mutexattr_gettype(),
pthread_mutexattr_getprioceiling(), pthread_mutexattr_getprotocol(), and
pthread_mutex_getprioceiling. The changes are in accordance to POSIX/SUSv4-2018.
Hinted by: DragonFlyBSD
Relnotes: yes
MFC after: 1 month
Differential Revision: D16722
Notes:
svn path=/head/; revision=337992
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function retrieves the thread name previously set by
pthread_set_name_np(3). The name is cached in the process memory.
Requested by: Willem Jan Withagen <wjw@digiware.nl>
Man page update: Yuri Pankov <yuripv@yuripv.net>
Reviewed by: ian (previous version)
Discussed with: arichardson, bjk (man page)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D16702
Notes:
svn path=/head/; revision=337983
|
| |
|
|
|
|
|
|
|
|
|
| |
The thr_new(2) syscall is called through libc stub. r154212 stopped
generating it for libthr but did not cleaned the unused remnants.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Notes:
svn path=/head/; revision=335258
|
| |
|
|
|
|
|
|
|
| |
This language dates back to when libthr was libc_r that included its own
syscalls and replaced libc entirely. It hasn't been relevant for a long
time.
Notes:
svn path=/head/; revision=334107
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Call _thr_check_init() before reading curthread in pthread_testcancel().
If a constructor in a library creates a semaphore via sem_init() and
then waits for it via sem_wait(), the program can core dump in
_pthread_testcancel() called from sem_wait(). This is because the
semaphore implementation lives in libc, so the library's constructors
can be run before libthr's constructors.
Reported by: arichardson
Reviewed by: kib
Obtained from: CheriBSD
MFC after: 1 week
Sponsored by: DARPA / AFRL
Differential Revision: https://reviews.freebsd.org/D14786
Notes:
svn path=/head/; revision=331324
|
| |
|
|
|
|
|
|
|
|
| |
This is also a warning in recent GCC with -Wimplicit-fallthrough.
CID: 1356262
Obtained from: DragonFly (git 0f037c78 - partial)
Notes:
svn path=/head/; revision=328493
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/head/; revision=326219
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly focus on files that use BSD 3-Clause license.
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.
Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
Notes:
svn path=/head/; revision=326025
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
Initially, only tag files that use BSD 4-Clause "Original" license.
RelNotes: yes
Differential Revision: https://reviews.freebsd.org/D13133
Notes:
svn path=/head/; revision=325966
|
| |
|
|
|
|
|
| |
Sponsored by: Netflix
Notes:
svn path=/head/; revision=325510
|
| |
|
|
|
|
|
| |
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=325188
|
| |
|
|
|
|
|
|
|
| |
Not a functional change.
MFC after: 3 days
Notes:
svn path=/head/; revision=325103
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix regression by r318539. The sysutils/pstack uses library libthread_db to
read information about threads state. The function pt_ta_new makes lookup of
several key symbols including _thread_keytable. But r318539 mades this field
static. It causes silent ignore of libthr library by pstack and as result
sysutils/pstack doesn't output any thread information.
This fix changes this field back to non-static.
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D11738
Notes:
svn path=/head/; revision=324219
|
| |
|
|
|
|
|
|
|
| |
`SUBDIR.${MK_TESTS}+= tests` idiom.
This is a follow up to r321912.
Notes:
svn path=/projects/make-check-sandbox/; revision=321914
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
directories to SUBDIR.${MK_TESTS} idiom
This is being done to pave the way for future work (and homogenity) in
^/projects/make-check-sandbox .
No functional change intended.
MFC after: 1 weeks
Notes:
svn path=/head/; revision=321912
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Following up on r320900, where the check for negative count values was
removed, add a check to prevent integer overflow. This is to account that
b_count, b_waiters but most importantly the total number of threads in
the system are signed values.
Discussed with: kib
MFC after: 2 weeks
Notes:
svn path=/head/; revision=321011
|
| |
|
|
|
|
|
| |
Obtained from: DragonFlyBSD (git e7db8139)
Notes:
svn path=/head/; revision=320990
|
| |
|
|
|
|
|
|
|
|
|
|
| |
...and silence cast-align warnings from gcc.
Reviewed by: kib
MFC after: 3 days
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10935
Notes:
svn path=/head/; revision=318956
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fix more warnings about redundant declarations.
Reviewed by: kib emaste
MFC after: 3 days
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10932
Notes:
svn path=/head/; revision=318955
|
| |
|
|
|
|
|
|
|
|
|
| |
I intended to add this to the previous commit.
Reviewed by: kib
MFC after: 3 days
Sponsored by: Dell EMC
Notes:
svn path=/head/; revision=318953
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__thr_setcontext() mistakenly tested for the presence of SIGCANCEL
in its local ucontext_t instead of the parameter. Therefore,
if a thread calls setcontext() with a context whose signal mask
contains SIGTHR (a.k.a. SIGCANCEL), that signal will be blocked,
preventing the thread from being cancelled or suspended.
Reported by: gcc 6.1 via RISC-V tinderbox
Reviewed by: kib
MFC after: 3 days
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10933
Notes:
svn path=/head/; revision=318952
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix warnings about:
- redundant declarations
- a local variable shadowing a global function (dlinfo)
- an old-style function definition (with an empty parameter list)
- a variable that is possibly used uninitialized
"make tinderbox" passes this time, except for a few unrelated
kernel failures.
Reviewed by: kib
MFC after: 3 days
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10870
Notes:
svn path=/head/; revision=318749
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Revert this while I fix RISC-V, SPARC, and probably all architectures
that use GCC.
Reported by: kib
Pointy hat to: vangyzen
Sponsored by: Dell EMC
Notes:
svn path=/head/; revision=318641
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
People tweaking the build system or compilers tend to look into
the Makefile and not into the source. Having some warning controls
in the Makefile and some in the source code is surprising.
Pragmas have the advantage that they leave the warnings enabled
for more code, but that advantage isn't very relevant in these cases.
Requested by: kib
Reviewed by: kib
MFC after: 3 days
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10832
Notes:
svn path=/head/; revision=318584
|