Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | If a thread who's name is being set is not the current thread, use macros | davidxu | 2007-04-05 | 1 | -2/+2 |
| | | | | | | | THR_THREAD_LOCK and THR_THREAD_UNLOCK instead, this should fix wrong lock level problem. Bug reported by: ed dot maste at gmail dot com | ||||
* | Remove 3rd clause, renumber, ok per email | imp | 2007-01-12 | 21 | -88/+22 |
| | |||||
* | Insert mutex at tail if it has highest ceiling. | davidxu | 2007-01-05 | 1 | -1/+1 |
| | |||||
* | Oops, don't corrupt the list. | davidxu | 2007-01-05 | 1 | -1/+1 |
| | |||||
* | Check if the PP mutex is recursive, if we have already locked it, place the | davidxu | 2007-01-05 | 1 | -9/+28 |
| | | | | mutex in right order sorted by priority ceiling. | ||||
* | get LIBPTHREAD_ADAPTIVE_SPIN early, so it can be used for some global | davidxu | 2006-12-20 | 1 | -2/+5 |
| | | | | mutexes. | ||||
* | Check environment variable PTHREAD_ADAPTIVE_SPIN, if it is set, use | davidxu | 2006-12-20 | 5 | -1/+8 |
| | | | | it as a default spin cycle count. | ||||
* | - Remove variable _thr_scope_system, all threads are system scope. | davidxu | 2006-12-15 | 4 | -24/+8 |
| | | | | | - Rename _thr_smp_cpus to boolean variable _thr_is_smp. - Define CPU_SPINWAIT macro for each arch, only X86 supports it. | ||||
* | Create inline function _thr_umutex_trylock2 to only try one atomic | davidxu | 2006-12-14 | 2 | -3/+11 |
| | | | | | operation, if it is failed, we call syscall directly, this saves one atomic operation per lock contention. | ||||
* | Correctly check failed syscall. | davidxu | 2006-12-12 | 1 | -10/+10 |
| | |||||
* | Move checking for c_has_waiters into low level _thr_ucond_signal and | davidxu | 2006-12-12 | 2 | -16/+12 |
| | | | | | | | _thr_ucond_broadcast, clear condition variable pointer in cancellation info after returing from _thr_ucond_wait, since kernel has already dropped the internal lock, so we don't need to unlock it in cancellation handler again. | ||||
* | test cancel_pending to save a thr_wake call in some specical cases. | davidxu | 2006-12-06 | 1 | -1/+1 |
| | |||||
* | _thr_ucond_wait drops lock, we should pick it up again. | davidxu | 2006-12-05 | 1 | -0/+1 |
| | |||||
* | the c_has_waiters is lazily updated, temporarily disable the false | davidxu | 2006-12-05 | 1 | -0/+2 |
| | | | | alarm code. | ||||
* | Use ucond to implement barrier. | davidxu | 2006-12-05 | 2 | -8/+10 |
| | |||||
* | Add _thr_ucond_init(). | davidxu | 2006-12-05 | 2 | -3/+10 |
| | |||||
* | Tweak _thr_cancel_leave_defer a bit to fix a possible race. | davidxu | 2006-12-05 | 1 | -3/+7 |
| | |||||
* | Fix typo, I was using a wrong header file, and the typo is not detected | davidxu | 2006-12-04 | 1 | -1/+1 |
| | | | | by compiler. | ||||
* | Use kernel provided userspace condition variable to implement pthread | davidxu | 2006-12-04 | 6 | -96/+105 |
| | | | | condition variable. | ||||
* | If a thread was detached, return EINVAL instead, the error code | davidxu | 2006-11-28 | 1 | -1/+1 |
| | | | | | | | | is also returned by pthread_detach() if a thread was already detached, the error code was already documented: > [EINVAL] The implementation has detected that the value speci- > fied by thread does not refer to a joinable thread. | ||||
* | Eliminate atomic operations in thread cancellation functions, it should | davidxu | 2006-11-24 | 12 | -213/+176 |
| | | | | reduce overheads of cancellation points. | ||||
* | Move code calculating new inherited priority into single function. | davidxu | 2006-11-11 | 1 | -30/+21 |
| | |||||
* | Don't inherit THR_FLAGS_NEED_SUSPEND for child process, child process | davidxu | 2006-10-14 | 1 | -0/+2 |
| | | | | | only has one thread, setting the flag can cause the thread to be suspended and no another thread will resume it. | ||||
* | o Make _thr_umutex_init a function. | davidxu | 2006-10-13 | 2 | -21/+23 |
| | | | | | | o Eliminate unused parameter for some functions. o Convert type of first parameter to void * for _thr_umtx_wait and _thr_umtx_wake. | ||||
* | Use type pthread_state for thread state. | davidxu | 2006-10-13 | 1 | -1/+1 |
| | |||||
* | use rtprio_thread system call to get or set thread priority. | davidxu | 2006-09-21 | 7 | -16/+90 |
| | |||||
* | Use return value of _thr_umutex_lock instead of using zero. | davidxu | 2006-09-08 | 1 | -2/+1 |
| | |||||
* | Replace internal usage of struct umtx with umutex which can supports | davidxu | 2006-09-06 | 14 | -158/+94 |
| | | | | real-time if we want, no functionality is changed. | ||||
* | Same as pthread_setschedparam, use sizeof(struct sched_param) instead. | davidxu | 2006-09-05 | 1 | -2/+2 |
| | |||||
* | Pass correct parameter size. | davidxu | 2006-09-05 | 1 | -2/+2 |
| | |||||
* | Remove unused file. | davidxu | 2006-08-29 | 1 | -59/+0 |
| | |||||
* | pthread_sigmask is in thr_sig.c, remove this file. | davidxu | 2006-08-28 | 1 | -52/+0 |
| | |||||
* | Kill unused files. | davidxu | 2006-08-28 | 2 | -187/+0 |
| | |||||
* | Use umutex APIs to implement pthread_mutex, member pp_mutexq is added | davidxu | 2006-08-28 | 4 | -73/+116 |
| | | | | | | into pthread structure to keep track of locked PTHREAD_PRIO_PROTECT mutex, no real mutex code is changed, the mutex locking and unlocking code should has same performance as before. | ||||
* | Add umutex APIs. | davidxu | 2006-08-28 | 2 | -0/+92 |
| | |||||
* | Axe unused member field. | davidxu | 2006-08-08 | 2 | -12/+2 |
| | |||||
* | Get number of CPUs and ignore spin count on single processor machine. | davidxu | 2006-08-08 | 3 | -6/+15 |
| | |||||
* | 1. Don't override underscore version of aio_suspend(), system(), | davidxu | 2006-07-25 | 3 | -78/+169 |
| | | | | | | | | | | wait(), waitpid() and usleep(), they are internal versions and should not be cancellation points. 2. Make wait3() as a cancellation point. 3. Move raise() and pause() into file thr_sig.c. 4. Add functions _sigsuspend, _sigwait, _sigtimedwait and _sigwaitinfo, remove SIGCANCEL bit in wait-set for those functions, the signal is used internally to implement thread cancellation. | ||||
* | Unexpand two TAILQ_FOREACH_SAFE cases. | delphij | 2006-07-17 | 2 | -4/+2 |
| | | | | Ok'ed by: davidxu | ||||
* | Caching scheduling policy and priority in userland, a critical but baddly | davidxu | 2006-07-13 | 5 | -20/+50 |
| | | | | | written application is frequently changing thread priority for SCHED_OTHER policy. | ||||
* | Use thr_setscheduler, thr_getscheduler and thr_setschedparam to implement | davidxu | 2006-07-13 | 4 | -26/+15 |
| | | | | pthread functions. | ||||
* | Use kernel facilities to support real-time scheduling. | davidxu | 2006-07-12 | 7 | -124/+103 |
| | |||||
* | Remove unused member. | davidxu | 2006-06-03 | 1 | -1/+0 |
| | |||||
* | Remove unused member field m_queue. | davidxu | 2006-06-02 | 2 | -6/+1 |
| | |||||
* | Explicitly request pre-zeroed memory instead of memset'ing our | delphij | 2006-05-31 | 1 | -5/+1 |
| | | | | | | own. Ok'ed by: davidxu | ||||
* | s/long/int. | davidxu | 2006-04-27 | 1 | -2/+2 |
| | |||||
* | - Use same priority range returned by kernel's sched_get_priority_min() | davidxu | 2006-04-27 | 6 | -55/+57 |
| | | | | | and sched_get_priority_max() syscalls. - Remove unused fields from structure pthread_attr. | ||||
* | Remove multiple _get_curthread() calls. | davidxu | 2006-04-23 | 1 | -4/+1 |
| | |||||
* | Do not check validity of timeout if a mutex can be acquired immediately. | davidxu | 2006-04-08 | 3 | -80/+103 |
| | | | | | Completly drop recursive mutex in pthread_cond_wait and restore recursive after resumption. Reorganize code to make gcc to generate better code. | ||||
* | WARNS level 4 cleanup. | davidxu | 2006-04-04 | 44 | -186/+244 |
| |