History log of /openbsd/lib/librthread/Makefile (Results 1 – 25 of 56)
Revision Date Author Comments
# 2ee00db3 06-Feb-2020 jsg <jsg@openbsd.org>

Instead of opting in to futexes on archs with atomics opt out on archs
without atomics, a smaller list.

ok mpi@ visa@


# 5ecdd056 13-Feb-2019 mpi <mpi@openbsd.org>

New futex(2) based rwlock implementation based on the mutex code.

This implementation reduces contention because threads no longer need
to spin calling sched_yield(2) before going to sleep.

Tested

New futex(2) based rwlock implementation based on the mutex code.

This implementation reduces contention because threads no longer need
to spin calling sched_yield(2) before going to sleep.

Tested by many, thanks!

ok visa@, pirofti@

show more ...


# 13e54a3c 12-Jan-2019 jca <jca@openbsd.org>

Move sigwait(3) from libpthread to libc

POSIX wants it in libc, that's where the function can be found on other
systems. Reported by naddy@, input from naddy@ and guenther@.
"looks ok" guenther@, o

Move sigwait(3) from libpthread to libc

POSIX wants it in libc, that's where the function can be found on other
systems. Reported by naddy@, input from naddy@ and guenther@.
"looks ok" guenther@, ok deraadt@

Note: riding the libc/libpthread major cranks earlier today.

show more ...


# 2b819b94 21-Oct-2018 visa <visa@openbsd.org>

Switch alpha to futex(2) based condvars, mutexes and semaphores.

From Brad, tested by Miod, OK kettenis@


# 94fcb538 15-Oct-2018 visa <visa@openbsd.org>

Switch powerpc to futex(2) based condvars, mutexes and semaphores.

From Brad, OK mpi@ kettenis@


# e9c926da 24-Sep-2018 jsg <jsg@openbsd.org>

enable futex(2) based mutexes on armv7 and use futex based semaphores in
librthread on armv7 as well
from brad ok visa@ kettenis@ mpi@


# 4b11781b 08-Jun-2018 pirofti <pirofti@openbsd.org>

New semaphore implementation making sem_post async-safe.

POSIX dictates that sem_post() needs to be async-safe here[0] and is
thus included in the list of safe functions to call from within a signal

New semaphore implementation making sem_post async-safe.

POSIX dictates that sem_post() needs to be async-safe here[0] and is
thus included in the list of safe functions to call from within a signal
handler here[1].

The old semaphore implementation is using spinlocks and __thrsleep to
synchronize between threads.

Let's say there are two threads: T0 and T1 and the semaphore has V=0.
T1 calls sem_wait() and it will now sleep (spinlock) until someone else
sem_post()'s. Let's say T0 sends a signal to T1 and exits.
The signal handler calls sem_post() which is meant to unblock T1 by
incrementing V. With the old semaphore implementation we we are now in a
deadlock as sem_post spinlocks on the same lock.

The new implementation does not suffer from this defect as it
uses futexes to resolve locking and thus sem_post does not need to spin.
Besides fixing this defect and making us POSIX compliant, this should
also improve performance as there should be less context switching and
thus less time spent in the kernel.

For architectures that do not provied futexes and atomic operations,
the old implementation will be used and it is now being renamed to
rthread_sem_compat as discussed with mpi@.

[0] -- http://pubs.opengroup.org/onlinepubs/9699919799/functions/sem_post.html
[1] -- http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html

OK visa@, mpi@, guenther@

show more ...


# 249f38f2 15-Oct-2017 guenther <guenther@openbsd.org>

Move the thread-related .h files to /usr/src/include/, since the
implementation is now spread between libc and librthread. No changes
to the content

ok mpi@


# a5511fa9 05-Sep-2017 guenther <guenther@openbsd.org>

Move mutex, condvar, and thread-specific data routes, pthread_once, and
pthread_exit from libpthread to libc, along with low-level bits to
support them. Major bump to both libc and libpthread.

Requ

Move mutex, condvar, and thread-specific data routes, pthread_once, and
pthread_exit from libpthread to libc, along with low-level bits to
support them. Major bump to both libc and libpthread.

Requested by libressl team. Ports testing by naddy@
ok kettenis@

show more ...


# 03ef7681 04-Jul-2017 visa <visa@openbsd.org>

Enable the use of futex(2) in librthread on mips64.

OK mpi@, deraadt@


# a2d5fdac 01-Jun-2017 mpi <mpi@openbsd.org>

Re-enabled futex based condvar & mutexes, they are not the cause of
vmd(8)'s regression.


# dee8611e 01-Jun-2017 mpi <mpi@openbsd.org>

New condvar introduced a regression with vmd(8), revert until it is found.

Reported by Gregor Best.


# 34bafbfd 29-May-2017 mpi <mpi@openbsd.org>

Enable futex-based mutex and condvar.

ok everybody


# 98414cf8 01-Jun-2016 tedu <tedu@openbsd.org>

implicit function declaration is the error we really want, not the
annoying strict prototypes


# fe38b55c 07-May-2016 guenther <guenther@openbsd.org>

Use a Thread Information Block in both single and multi-threaded programs.
This stores errno, the cancelation flags, and related bits for each thread
and is allocated by ld.so or libc.a. This is an

Use a Thread Information Block in both single and multi-threaded programs.
This stores errno, the cancelation flags, and related bits for each thread
and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable!

Make libpthread dlopen'able by moving the cancelation wrappers into libc
and doing locking and fork/errno handling via callbacks that libpthread
registers when it first initializes. 'errno' *must* be declared via
<errno.h> now!

Clean up libpthread's symbol exports like libc.

On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec.

Testing by various, particularly sthen@ and patrick@
ok kettenis@

show more ...


# 7567a0bf 02-Apr-2016 guenther <guenther@openbsd.org>

Wrap <pthread.h> and <pthread_np.h> to eliminate PLT entries for internal
references. Use _thread_pagesize for the semaphore mmap size instead of
calling getpagesize() each time.

ok beck@


# b8ec2dbd 19-May-2015 guenther <guenther@openbsd.org>

Instead of testing for __ELF__ and/or vax, leave out the bits for interfacing
with ld.so locking whenever building NOPIC

pointless use of __ELF__ noted by brad@
ok miod@


# 1e29880e 16-Jul-2014 okan <okan@openbsd.org>

zap trailing newlines; "go for it" deraadt


# c3c1bed6 10-Jul-2014 guenther <guenther@openbsd.org>

__tfork_thread is in libc, so move the manpage over too

ok deraadt@


# 88919d82 06-Aug-2013 miod <miod@openbsd.org>

Remove support for COMPILER_VERSION == gcc2.
Change the logic depending upon COMPILER_VERSION everywhere, to assume gcc4
is the norm and to explicitely test for gcc3 when a different behaviour
is req

Remove support for COMPILER_VERSION == gcc2.
Change the logic depending upon COMPILER_VERSION everywhere, to assume gcc4
is the norm and to explicitely test for gcc3 when a different behaviour
is required.
No functional change intended. Be sure to `make install' in share/mk before
attempting to do anything.

show more ...


# 6231a781 05-Jul-2013 miod <miod@openbsd.org>

ELF_TOOLCHAIN bye bye.


# 7b36c281 17-Jun-2013 guenther <guenther@openbsd.org>

Add support for the _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME options,
including CLOCK_{PROCESS,THREAD}_CPUTIME_ID constants and
{clock,pthread}_getcpuclockid() functions.

Worked out at t2k13 with he

Add support for the _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME options,
including CLOCK_{PROCESS,THREAD}_CPUTIME_ID constants and
{clock,pthread}_getcpuclockid() functions.

Worked out at t2k13 with help from tedu@ and matthew@ and testing by aja@
ok matthew@

show more ...


# 9f399995 22-Nov-2012 miod <miod@openbsd.org>

Do not pass -Wmissing-prototypes when building on a non-ELF platform with
gcc 3 as the compiler. The way constructors are built triggers this warning,
which is fatal because of -Werror. ok espie@ gue

Do not pass -Wmissing-prototypes when building on a non-ELF platform with
gcc 3 as the compiler. The way constructors are built triggers this warning,
which is fatal because of -Werror. ok espie@ guenther@

show more ...


# 9b9a5023 12-Sep-2012 haesbaert <haesbaert@openbsd.org>

Define empty CDIAGFLAGS for programs that use Werror.
Makes "make build" build with WARNINGS=Yes on amd64.

ok espie


# 6b29d477 15-Aug-2012 matthew <matthew@openbsd.org>

A couple small but long anticipated changes:

- Link libpthread.so with -znodlopen. Because libpthread overrides
the weak symbols in libc, we can't allow it to be dynamically
loaded or els

A couple small but long anticipated changes:

- Link libpthread.so with -znodlopen. Because libpthread overrides
the weak symbols in libc, we can't allow it to be dynamically
loaded or else libc's weak symbols might have already been
resolved by ld.so. (Also, major bump because this is technically
a backwards incompat change in behavior, although dlopen()ing
libpthread never really worked.)

- Link libc.so with -nodefaultlibs -lgcc. This ensures that libc
doesn't try to link against itself (which ld.so wouldn't like).

- Change GCC 4 to link shared objects with -lpthread and -lc as
appropriate, now that there's no issues with doing so. This means
that it's no longer necessary to patch software to use -pthread
instead of -lpthread. (Ports tree rejoice!)

Also, to preemptively answer this question: No, this does not
eliminate the need for LD_PRELOAD=libpthread.so. That's a separate
issue that won't be resolved until we eliminate libc's weak symbols.

Discussed extensively on email and icb over the past few months.
ok deraadt

show more ...


123