History log of /freebsd/lib/libthr/thread/thr_fork.c (Results 51 – 75 of 75)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# cb5c4b10 27-Nov-2008 Konstantin Belousov <kib@FreeBSD.org>

Add two rtld exported symbols, _rtld_atfork_pre and _rtld_atfork_post.
Threading library calls _pre before the fork, allowing the rtld to
lock itself to ensure that other threads of the process are o

Add two rtld exported symbols, _rtld_atfork_pre and _rtld_atfork_post.
Threading library calls _pre before the fork, allowing the rtld to
lock itself to ensure that other threads of the process are out of
dynamic linker. _post releases the locks.

This allows the rtld to have consistent state in the child. Although
child may legitimately call only async-safe functions, the call may
need plt relocation resolution, and this requires working rtld.

Reported and debugging help by: rink
Reviewed by: kan, davidxu
MFC after: 1 month (anyway, not before 7.1 is out)

show more ...


Revision tags: release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0
# fed32d75 12-Jan-2007 Warner Losh <imp@FreeBSD.org>

Remove 3rd clause, renumber, ok per email


Revision tags: release/6.2.0_cvs, release/6.2.0
# f08e1bf6 24-Nov-2006 David Xu <davidxu@FreeBSD.org>

Eliminate atomic operations in thread cancellation functions, it should
reduce overheads of cancellation points.


# 5656b5fa 14-Oct-2006 David Xu <davidxu@FreeBSD.org>

Don't inherit THR_FLAGS_NEED_SUSPEND for child process, child process
only has one thread, setting the flag can cause the thread to be
suspended and no another thread will resume it.


# bddd24cd 06-Sep-2006 David Xu <davidxu@FreeBSD.org>

Replace internal usage of struct umtx with umutex which can supports
real-time if we want, no functionality is changed.


Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0
# 37a6356b 04-Apr-2006 David Xu <davidxu@FreeBSD.org>

WARNS level 4 cleanup.


# 52828c0e 12-Jan-2006 Jason Evans <jasone@FreeBSD.org>

In preparation for a new malloc implementation:

* Add posix_memalign().

* Move calloc() from calloc.c to malloc.c. Add a calloc() implementation in
rtld-elf in order to make the loader hap

In preparation for a new malloc implementation:

* Add posix_memalign().

* Move calloc() from calloc.c to malloc.c. Add a calloc() implementation in
rtld-elf in order to make the loader happy (even though calloc() isn't
used in rtld-elf).

* Add _malloc_prefork() and _malloc_postfork(), and use them instead of
directly manipulating __malloc_lock.

Approved by: phk, markm (mentor)

show more ...


# 97986a2e 03-Jan-2006 David Xu <davidxu@FreeBSD.org>

Remove in-progress wait code to sync with libpthread's behavior.


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 ...


# 2e370a5c 26-May-2009 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

Merge from HEAD


# 43af51a2 11-May-2009 Brian Feldman <green@FreeBSD.org>

These are some cosmetic changes to improve the clarity of libthr's fork implementation.


Revision tags: release/7.2.0_cvs, release/7.2.0
# 9c797940 13-Apr-2009 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

- Merge from HEAD


# 29986e1b 19-Mar-2009 Konstantin Belousov <kib@FreeBSD.org>

Forcibly unlock the malloc() locks in the child process after fork(),
by temporary pretending that the process is still multithreaded.
Current malloc lock primitives do nothing for singlethreaded pro

Forcibly unlock the malloc() locks in the child process after fork(),
by temporary pretending that the process is still multithreaded.
Current malloc lock primitives do nothing for singlethreaded process.

Reviewed by: davidxu, deischen

show more ...


# 10b40346 02-Dec-2008 Konstantin Belousov <kib@FreeBSD.org>

Provide custom simple allocator for rtld locks in libthr. The allocator
does not use any external symbols, thus avoiding possible recursion into
rtld to resolve symbols, when called.

Reviewed by: ka

Provide custom simple allocator for rtld locks in libthr. The allocator
does not use any external symbols, thus avoiding possible recursion into
rtld to resolve symbols, when called.

Reviewed by: kan, davidxu
Tested by: rink
MFC after: 1 month

show more ...


# 97df3834 01-Dec-2008 Alexander Kabaev <kan@FreeBSD.org>

Invoke _rtld_atfork_post earlier, before we reinitialize rtld locks
by switching into single-thread mode.

libthr ignores broken use of lock bitmaps used by default rtld locking
implementation, this

Invoke _rtld_atfork_post earlier, before we reinitialize rtld locks
by switching into single-thread mode.

libthr ignores broken use of lock bitmaps used by default rtld locking
implementation, this in turn turns lock handoff in _rtld_thread_init
into NOP. This in turn makes child processes of forked multi-threaded
programs to run with _thr_signal_block still in effect, with most
signals blocked.

Reported by: phk, kib

show more ...


# e711c6f0 29-Nov-2008 Konstantin Belousov <kib@FreeBSD.org>

Unlock the malloc() locks in the child process after fork(). This gives
us working malloc in the fork child of the multithreaded process.

Although POSIX requires that only async-signal safe function

Unlock the malloc() locks in the child process after fork(). This gives
us working malloc in the fork child of the multithreaded process.

Although POSIX requires that only async-signal safe functions shall be
operable after fork in multithreaded process, not having malloc lower
the quality of our implementation.

Tested by: rink
Discussed with: kan, davidxu
Reviewed by: kan
MFC after: 1 month

show more ...


# cb5c4b10 27-Nov-2008 Konstantin Belousov <kib@FreeBSD.org>

Add two rtld exported symbols, _rtld_atfork_pre and _rtld_atfork_post.
Threading library calls _pre before the fork, allowing the rtld to
lock itself to ensure that other threads of the process are o

Add two rtld exported symbols, _rtld_atfork_pre and _rtld_atfork_post.
Threading library calls _pre before the fork, allowing the rtld to
lock itself to ensure that other threads of the process are out of
dynamic linker. _post releases the locks.

This allows the rtld to have consistent state in the child. Although
child may legitimately call only async-safe functions, the call may
need plt relocation resolution, and this requires working rtld.

Reported and debugging help by: rink
Reviewed by: kan, davidxu
MFC after: 1 month (anyway, not before 7.1 is out)

show more ...


Revision tags: release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0
# fed32d75 12-Jan-2007 Warner Losh <imp@FreeBSD.org>

Remove 3rd clause, renumber, ok per email


Revision tags: release/6.2.0_cvs, release/6.2.0
# f08e1bf6 24-Nov-2006 David Xu <davidxu@FreeBSD.org>

Eliminate atomic operations in thread cancellation functions, it should
reduce overheads of cancellation points.


# 5656b5fa 14-Oct-2006 David Xu <davidxu@FreeBSD.org>

Don't inherit THR_FLAGS_NEED_SUSPEND for child process, child process
only has one thread, setting the flag can cause the thread to be
suspended and no another thread will resume it.


# bddd24cd 06-Sep-2006 David Xu <davidxu@FreeBSD.org>

Replace internal usage of struct umtx with umutex which can supports
real-time if we want, no functionality is changed.


Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0
# 37a6356b 04-Apr-2006 David Xu <davidxu@FreeBSD.org>

WARNS level 4 cleanup.


# 52828c0e 12-Jan-2006 Jason Evans <jasone@FreeBSD.org>

In preparation for a new malloc implementation:

* Add posix_memalign().

* Move calloc() from calloc.c to malloc.c. Add a calloc() implementation in
rtld-elf in order to make the loader hap

In preparation for a new malloc implementation:

* Add posix_memalign().

* Move calloc() from calloc.c to malloc.c. Add a calloc() implementation in
rtld-elf in order to make the loader happy (even though calloc() isn't
used in rtld-elf).

* Add _malloc_prefork() and _malloc_postfork(), and use them instead of
directly manipulating __malloc_lock.

Approved by: phk, markm (mentor)

show more ...


# 97986a2e 03-Jan-2006 David Xu <davidxu@FreeBSD.org>

Remove in-progress wait code to sync with libpthread's behavior.


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 ...


123