Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Remove options MK_LIBKSE and DEFAULT_THREAD_LIB now that we no longer | ru | 2008-03-29 | 1 | -4/+1 |
| | | | | build libkse. This should fix WITHOUT_LIBTHR builds as a side effect. | ||||
* | Compile libthr with warnings. | ru | 2008-03-25 | 3 | -6/+9 |
| | |||||
* | Fixed mis-implementation of pthread_mutex_get{spin,yield}loops_np(). | ru | 2008-03-25 | 1 | -4/+7 |
| | | | | Reviewed by: davidxu | ||||
* | Add POSIX pthread API pthread_getcpuclockid() to get a thread's cpu | davidxu | 2008-03-22 | 3 | -0/+50 |
| | | | | time clock id. | ||||
* | Resolve __error()'s PLT early so that it needs not to be resolved again, | davidxu | 2008-03-21 | 1 | -0/+3 |
| | | | | | otherwise rwlock is recursivly called when signal happens and the __error was never resolved before. | ||||
* | pthread_mutexattr_destroy() was accidentally broken in last revision, | ru | 2008-03-20 | 1 | -0/+1 |
| | | | | unbreak it. We should really start compiling this with warnings. | ||||
* | Preserve application code's errno in rtld locking code, it attemps to keep | davidxu | 2008-03-20 | 1 | -2/+31 |
| | | | | any case safe. | ||||
* | Make pthread_mutexattr_settype to return error number directly and | davidxu | 2008-03-20 | 1 | -3/+1 |
| | | | | | | conformant to POSIX specification. Bug reported by: modelnine at modelnine dt org | ||||
* | don't reduce new thread's refcount if current thread can not set cpuset | davidxu | 2008-03-19 | 1 | -1/+1 |
| | | | | for it, since the new thread will reduce it by itself. | ||||
* | - Trim trailing spaces. | davidxu | 2008-03-19 | 1 | -8/+8 |
| | | | | - Use a different sigmask variable name to avoid confusing. | ||||
* | if passed thread pointer is equal to current thread, pass -1 to kernel | davidxu | 2008-03-19 | 1 | -11/+19 |
| | | | | to speed up searching. | ||||
* | - Copy signal mask out before THR_UNLOCK(), because THR_UNLOCK() may call | davidxu | 2008-03-18 | 3 | -4/+17 |
| | | | | | | | | _thr_suspend_check() which messes sigmask saved in thread structure. - Don't suspend a thread has force_exit set. - In pthread_exit(), if there is a suspension flag set, wake up waiting- thread after setting PS_DEAD, this causes waiting-thread to break loop in suspend_common(). | ||||
* | Actually delete SIGCANCEL mask for suspended thread, so the signal will not | davidxu | 2008-03-16 | 1 | -3/+2 |
| | | | | be masked when it is resumed. | ||||
* | If a thread is cancelled, it may have already consumed a umtx_wake, | davidxu | 2008-03-11 | 1 | -0/+2 |
| | | | | check waiter and semphore counter to see if we may wake up next thread. | ||||
* | Fix a bug when calculating remnant size. | davidxu | 2008-03-06 | 1 | -1/+1 |
| | |||||
* | Don't report death event to debugger if it is a forced exit. | davidxu | 2008-03-06 | 1 | -1/+1 |
| | |||||
* | Restore code setting new thread's scheduler parameters, I was thinking | davidxu | 2008-03-06 | 1 | -15/+11 |
| | | | | | | that there might be starvations, but because we have already locked the thread, the cpuset settings will always be done before the new thread does real-world work. | ||||
* | Increase and decrease in_sigcancel_handler accordingly to avoid possible | davidxu | 2008-03-05 | 1 | -2/+2 |
| | | | | error caused by nested SIGCANCEL stack, it is a bit complex. | ||||
* | Use cpuset defined in pthread_attr for newly created thread, for now, | davidxu | 2008-03-05 | 3 | -21/+57 |
| | | | | | | | we set scheduling parameters and cpu binding fully in userland, and because default scheduling policy is SCHED_RR (time-sharing), we set default sched_inherit to PTHREAD_SCHED_INHERIT, this saves a system call. | ||||
* | Add more cpu affinity function's symbols. | davidxu | 2008-03-05 | 1 | -0/+6 |
| | |||||
* | Check actual size of cpuset kernel is using and define underscore version | davidxu | 2008-03-05 | 1 | -7/+42 |
| | | | | of API. | ||||
* | If a new thread is created, it inherits current thread's signal masks, | davidxu | 2008-03-04 | 3 | -1/+24 |
| | | | | | | | | however if current thread is executing cancellation handler, signal SIGCANCEL may have already been blocked, this is unexpected, unblock the signal in new thread if this happens. MFC after: 1 week | ||||
* | Include cpuset.h, unbreak compiling. | davidxu | 2008-03-04 | 1 | -0/+2 |
| | |||||
* | implement pthread_attr_getaffinity_np and pthread_attr_setaffinity_np. | davidxu | 2008-03-04 | 4 | -3/+68 |
| | |||||
* | Implement functions pthread_getaffinity_np and pthread_setaffinity_np to | davidxu | 2008-03-03 | 3 | -1/+78 |
| | | | | get and set thread's cpu affinity mask. | ||||
* | _pthread_mutex_isowned_np(): use a more reliable method; the current code | des | 2008-02-14 | 1 | -1/+1 |
| | | | | | | will work in simple cases, but may fail in more complicated ones. Reviewed by: davidxu | ||||
* | style.Makefile(5) | obrien | 2008-02-13 | 6 | -6/+6 |
| | |||||
* | style(9) | obrien | 2008-02-13 | 2 | -6/+6 |
| | |||||
* | Yet another pointy hat: when I zapped FBSDprivate_1.1, I forgot to move | des | 2008-02-06 | 1 | -0/+1 |
| | | | | its contents to FBSDprivate_1.0. | ||||
* | Remove unnecessary prototype. | des | 2008-02-06 | 1 | -1/+0 |
| | |||||
* | Convert pthread.map to the format expected by version_gen.awk, and modify | des | 2008-02-06 | 2 | -11/+3 |
| | | | | | | the Makefile accordingly; libthr now explicitly uses libc's Versions.def. MFC after: 2 weeks | ||||
* | Remove incorrectly added FBSDprivate_1.1 namespace, and move symbols which | des | 2008-02-06 | 1 | -12/+4 |
| | | | | are new in FreeBSD 8 to the appropriate namespace. | ||||
* | Per discussion on -threads, rename _islocked_np() to _isowned_np(). | des | 2008-02-06 | 2 | -5/+5 |
| | |||||
* | After careful consideration (and a brief discussion with attilio@), change | des | 2008-02-04 | 1 | -1/+1 |
| | | | | | | | | | the semantics of pthread_mutex_islocked_np() to return true if and only if the mutex is held by the current thread. Obviously, change the regression test to match. MFC after: 2 weeks | ||||
* | Add pthread_mutex_islocked_np(), a cheap way to verify that a mutex is | des | 2008-02-03 | 2 | -0/+31 |
| | | | | | | | locked. This is intended primarily to support the userland equivalent of the various *_ASSERT_LOCKED() macros we have in the kernel. MFC after: 2 weeks | ||||
* | SYSTEM_SCOPE_ONLY flag is no longer needed, it is the only mode libthr | davidxu | 2008-01-18 | 1 | -2/+0 |
| | | | | supports. | ||||
* | sem_post() requires to return -1 on error. | davidxu | 2008-01-07 | 1 | -2/+2 |
| | |||||
* | call underscore version of pthread_cleanup_pop instead. | davidxu | 2007-12-20 | 1 | -1/+1 |
| | |||||
* | Remove vfork() overloading, it is no longer needed. | davidxu | 2007-12-20 | 2 | -11/+0 |
| | |||||
* | Add function prototypes. | davidxu | 2007-12-17 | 1 | -1/+7 |
| | |||||
* | 1. Add function pthread_mutex_setspinloops_np to turn a mutex's spin | davidxu | 2007-12-14 | 3 | -29/+114 |
| | | | | | | | | loop count. 2. Add function pthread_mutex_setyieldloops_np to turn a mutex's yield loop count. 3. Make environment variables PTHREAD_SPINLOOPS and PTHREAD_YIELDLOOPS to be only used for turnning PTHREAD_MUTEX_ADAPTIVE_NP mutex. | ||||
* | Enclose all code for macro ENQUEUE_MUTEX in do while statement, and | davidxu | 2007-12-11 | 1 | -5/+7 |
| | | | | | | add missing brackets. MFC: after 1 day | ||||
* | Fix pointer dereferencing problems in _pthread_mutex_init_calloc_cb() that | jasone | 2007-11-28 | 1 | -7/+3 |
| | | | | were obscured by pseudo-opaque pthreads API pointer casting. | ||||
* | Add _pthread_mutex_init_calloc_cb() to libthr and libkse, so that malloc(3) | jasone | 2007-11-27 | 2 | -6/+28 |
| | | | | | (part of libc) can use pthreads mutexes without causing infinite recursion during initialization. | ||||
* | Simplify code, fix a thread cancellation bug in sem_wait and sem_timedwait. | davidxu | 2007-11-23 | 1 | -21/+15 |
| | |||||
* | Reuse nwaiter member field to record number of waiters, in sem_post(), | davidxu | 2007-11-21 | 1 | -7/+31 |
| | | | | | this should reduce the chance having to do a syscall when there is no waiter in the semaphore. | ||||
* | Remove warning level and aliasing restrictions. | davidxu | 2007-11-21 | 1 | -2/+0 |
| | |||||
* | Convert ceiling type to unsigned integer before comparing, fix compiler | davidxu | 2007-11-21 | 1 | -3/+3 |
| | | | | warnings. | ||||
* | Add some function prototypes. | davidxu | 2007-11-21 | 1 | -0/+5 |
| | |||||
* | Remove umtx_t definition, use type long directly, add wrapper function | davidxu | 2007-11-21 | 7 | -18/+31 |
| | | | | | _thr_umtx_wait_uint() for umtx operation UMTX_OP_WAIT_UINT, use the function in semaphore operations, this fixed compiler warnings. |