#
40f65a4d |
| 07-Aug-2013 |
Peter Grehan <grehan@FreeBSD.org> |
IFC @ r254014
|
#
552311f4 |
| 17-Jul-2013 |
Xin LI <delphij@FreeBSD.org> |
IFC @253398
|
#
cfe30d02 |
| 19-Jun-2013 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Merge fresh head.
|
Revision tags: release/8.4.0 |
|
#
da7d2afb |
| 01-May-2013 |
Jilles Tjoelker <jilles@FreeBSD.org> |
Add accept4() system call.
The accept4() function, compared to accept(), allows setting the new file descriptor atomically close-on-exec and explicitly controlling the non-blocking status on the new
Add accept4() system call.
The accept4() function, compared to accept(), allows setting the new file descriptor atomically close-on-exec and explicitly controlling the non-blocking status on the new socket. (Note that the latter point means that accept() is not equivalent to any form of accept4().)
The linuxulator's accept4 implementation leaves a race window where the new file descriptor is not close-on-exec because it calls sys_accept(). This implementation leaves no such race window (by using falloc() flags). The linuxulator could be fixed and simplified by using the new code.
Like accept(), accept4() is async-signal-safe, a cancellation point and permitted in capability mode.
show more ...
|
Revision tags: release/9.1.0, release/8.3.0_cvs, release/8.3.0, release/9.0.0, release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0 |
|
#
678b238c |
| 07-Feb-2011 |
Jung-uk Kim <jkim@FreeBSD.org> |
Introduce a non-portable function pthread_getthreadid_np(3) to retrieve calling thread's unique integral ID, which is similar to AIX function of the same name. Bump __FreeBSD_version to note its int
Introduce a non-portable function pthread_getthreadid_np(3) to retrieve calling thread's unique integral ID, which is similar to AIX function of the same name. Bump __FreeBSD_version to note its introduction.
Reviewed by: kib
show more ...
|
#
da2fcff7 |
| 09-Jan-2011 |
Konstantin Belousov <kib@FreeBSD.org> |
Implement the __pthread_map_stacks_exec() for libthr.
Stack creation code is changed to call _rtld_get_stack_prot() to get the stack protection right. There is a race where thread is created during
Implement the __pthread_map_stacks_exec() for libthr.
Stack creation code is changed to call _rtld_get_stack_prot() to get the stack protection right. There is a race where thread is created during dlopen() of dso that requires executable stacks. Then, _rtld_get_stack_prot() may return PROT_READ | PROT_WRITE, but thread is still not linked into the thread list. In this case, the callback misses the thread stack, and rechecks the required protection afterward.
Reviewed by: davidxu
show more ...
|
#
19fe8e84 |
| 22-Oct-2010 |
Dimitry Andric <dim@FreeBSD.org> |
Sync: merge r214077 through r214219 from ^/head.
|
#
de1e74c6 |
| 20-Oct-2010 |
David Xu <davidxu@FreeBSD.org> |
Revert revision 214007, I realized that MySQL wants to resolve a silly rwlock deadlock problem, the deadlock is caused by writer waiters, if a thread has already locked a reader lock, and wants to ac
Revert revision 214007, I realized that MySQL wants to resolve a silly rwlock deadlock problem, the deadlock is caused by writer waiters, if a thread has already locked a reader lock, and wants to acquire another reader lock, it will be blocked by writer waiters, but we had already fixed it years ago.
show more ...
|
#
ae36f947 |
| 19-Oct-2010 |
Dimitry Andric <dim@FreeBSD.org> |
Sync: merge r213992 through r214076 from ^/head.
|
#
bc15e580 |
| 18-Oct-2010 |
David Xu <davidxu@FreeBSD.org> |
sort function name.
|
#
a6b9b59e |
| 18-Oct-2010 |
David Xu <davidxu@FreeBSD.org> |
Add pthread_rwlockattr_setkind_np and pthread_rwlockattr_getkind_np, the functions set or get pthread_rwlock type, current supported types are: PTHREAD_RWLOCK_PREFER_READER_NP, PTHREAD_RWLOCK_P
Add pthread_rwlockattr_setkind_np and pthread_rwlockattr_getkind_np, the functions set or get pthread_rwlock type, current supported types are: PTHREAD_RWLOCK_PREFER_READER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, PTHREAD_RWLOCK_PREFER_WRITER_NP, default is PTHREAD_RWLOCK_PREFER_WRITER_NONCECURSIVE_NP, this maintains binary compatible with old code.
show more ...
|
#
f4213b90 |
| 25-Sep-2010 |
David Xu <davidxu@FreeBSD.org> |
To support stack unwinding for cancellation points, add -fexceptions flag for them, two functions _pthread_cancel_enter and _pthread_cancel_leave are added to let thread enter and leave a cancellatio
To support stack unwinding for cancellation points, add -fexceptions flag for them, two functions _pthread_cancel_enter and _pthread_cancel_leave are added to let thread enter and leave a cancellation point, it also makes it possible that other functions can be cancellation points in libraries without having to be rewritten in libthr.
show more ...
|
#
fa1efe5e |
| 13-Sep-2010 |
David Xu <davidxu@FreeBSD.org> |
Update symbol.
|
#
5cf22195 |
| 24-Aug-2010 |
David Xu <davidxu@FreeBSD.org> |
Add wrapper for setcontext() and swapcontext(), the wrappers unblock SIGCANCEL which is needed by thread cancellation.
|
#
ea246b63 |
| 23-Aug-2010 |
Konstantin Belousov <kib@FreeBSD.org> |
On shared object unload, in __cxa_finalize, call and clear all installed atexit and __cxa_atexit handlers that are either installed by unloaded dso, or points to the functions provided by the dso.
U
On shared object unload, in __cxa_finalize, call and clear all installed atexit and __cxa_atexit handlers that are either installed by unloaded dso, or points to the functions provided by the dso.
Use _rtld_addr_phdr to locate segment information from the address of private variable belonging to the dso, supplied by crtstuff.c. Provide utility function __elf_phdr_match_addr to do the match of address against dso executable segment.
Call back into libthr from __cxa_finalize using weak __pthread_cxa_finalize symbol to remove any atfork handler which function points into unloaded object.
The rtld needs private __pthread_cxa_finalize symbol to not require resolution of the weak undefined symbol at initialization time. This cannot work, since rtld is relocated before sym_zero is set up.
Idea by: kan Reviewed by: kan (previous version) MFC after: 3 weeks
show more ...
|
Revision tags: release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0 |
|
#
1a0fda2b |
| 04-Mar-2010 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
IFH@204581
|
#
9199c09a |
| 06-Jan-2010 |
Warner Losh <imp@FreeBSD.org> |
Merge from head at r201628.
# This hasn't been tested, and there are at least three bad commits # that need to be backed out before the branch will be stable again.
|
#
791f7a99 |
| 05-Jan-2010 |
David Xu <davidxu@FreeBSD.org> |
Remove extra new semaphore stubs, because libc already has them, and ld can find the newest version which is default.
Poked by: kan@
|
#
9b0f1823 |
| 05-Jan-2010 |
David Xu <davidxu@FreeBSD.org> |
Use umtx to implement process sharable semaphore, to make this work, now type sema_t is a structure which can be put in a shared memory area, and multiple processes can operate it concurrently. User
Use umtx to implement process sharable semaphore, to make this work, now type sema_t is a structure which can be put in a shared memory area, and multiple processes can operate it concurrently. User can either use mmap(MAP_SHARED) + sem_init(pshared=1) or use sem_open() to initialize a shared semaphore. Named semaphore uses file system and is located in /tmp directory, and its file name is prefixed with 'SEMD', so now it is chroot or jail friendly. In simplist cases, both for named and un-named semaphore, userland code does not have to enter kernel to reduce/increase semaphore's count. The semaphore is designed to be crash-safe, it means even if an application is crashed in the middle of operating semaphore, the semaphore state is still safely recovered by later use, there is no waiter counter maintained by userland code. The main semaphore code is in libc and libthr only has some necessary stubs, this makes it possible that a non-threaded application can use semaphore without linking to thread library. Old semaphore implementation is kept libc to maintain binary compatibility. The kernel ksem API is no longer used in the new implemenation.
Discussed on: threads@
show more ...
|
Revision tags: release/8.0.0_cvs, release/8.0.0 |
|
#
874108ae |
| 12-Nov-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
MFC @199204
|
#
29670497 |
| 11-Oct-2009 |
Jilles Tjoelker <jilles@FreeBSD.org> |
Make openat(2) a cancellation point.
This is required by POSIX and matches open(2).
Reviewed by: kib, jhb MFC after: 1 month
|
Revision tags: 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 |
|
#
83a07587 |
| 09-Jun-2008 |
David Xu <davidxu@FreeBSD.org> |
Make pthread_cleanup_push() and pthread_cleanup_pop() as a pair of macros, use stack space to keep cleanup information, this eliminates overhead of calling malloc() and free() in thread library.
Dis
Make pthread_cleanup_push() and pthread_cleanup_pop() as a pair of macros, use stack space to keep cleanup information, this eliminates overhead of calling malloc() and free() in thread library.
Discussed on: thread@
show more ...
|
#
9939a136 |
| 22-Mar-2008 |
David Xu <davidxu@FreeBSD.org> |
Add POSIX pthread API pthread_getcpuclockid() to get a thread's cpu time clock id.
|
#
07bbb166 |
| 05-Mar-2008 |
David Xu <davidxu@FreeBSD.org> |
Add more cpu affinity function's symbols.
|
#
57030e10 |
| 03-Mar-2008 |
David Xu <davidxu@FreeBSD.org> |
Implement functions pthread_getaffinity_np and pthread_setaffinity_np to get and set thread's cpu affinity mask.
|