summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread
Commit message (Collapse)AuthorAgeFilesLines
* Add missing symbol pthread_set_name_np.davidxu2006-01-231-0/+2
|
* Eliminate unused code.davidxu2006-01-161-7/+1
|
* Enable mutex inheritance code in mutex_fork, I forgot to turn on it.davidxu2006-01-141-1/+11
| | | | while here, add some comments about process shared mutex.
* Increase the number of spinlocks, since libc's malloc implementation isjasone2006-01-131-1/+1
| | | | | | about to significantly increase the number of spinlocks used. Approved by: markm (mentor)
* In preparation for a new malloc implementation:jasone2006-01-121-10/+4
| | | | | | | | | | | | | * 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)
* Use macro STATIC_LIB_REQUIRE to declare a symbol should be linked intodavidxu2006-01-102-95/+74
| | | | static binary.
* Rescue pthread_set_name_np for compatible reason, remove unused code.davidxu2006-01-092-151/+10
|
* Tweak macro THR_LOCK_RELEASE a bit for non-PTHREAD_INVARIANTS case.davidxu2006-01-091-7/+14
|
* Return real detached state.davidxu2006-01-091-0/+2
|
* Fix a bug recently introduced, the _thread_active_count should bedavidxu2006-01-081-0/+1
| | | | decreased if thread can not be created.
* Allow background threads to be suspended.davidxu2006-01-081-1/+4
|
* Try to reduce total time needed for suspending all threads,davidxu2006-01-081-4/+17
| | | | first broadcast signals to all threads, then enter a wait loop.
* Refine thread suspension code, now thread suspension is a blockabledavidxu2006-01-057-68/+177
| | | | | | | operation, the caller is blocked util target threads are really suspended, also avoid suspending a thread when it is holding a critical lock. Fix a bug in _thr_ref_delete which tests a never set flag.
* 1. Add SIGEV_THREAD notification for mq_notify.davidxu2006-01-041-198/+339
| | | | | 2. Reuse current timer code and abstract some common code to to support both timer and mqueue.
* Remove in-progress wait code to sync with libpthread's behavior.davidxu2006-01-031-30/+8
|
* Let _mutex_cv_lock call internal functiona mutex_lock_common.davidxu2005-12-211-1/+2
|
* Hide umtx API symbols as well.davidxu2005-12-212-6/+9
|
* 1. Retire macro SCLASS, instead simply use language keyword anddavidxu2005-12-212-109/+124
| | | | | put variables in thr_init.c. 2. Hide all global symbols which won't be exported.
* Clear return code to zero if joiner successfully waited joinee.davidxu2005-12-191-0/+1
| | | | | Bug reported by: jasone at connonware when using ports lang/onyx MFC after: 3 days
* Update copyright.davidxu2005-12-176-113/+84
|
* Remove unused _get_curthread() call.davidxu2005-12-121-2/+0
|
* Fix name compatible problem with POSIX standard. the sigval_ptr anddavidxu2005-11-041-5/+5
| | | | | | sigval_int really should be sival_ptr and sival_int. Also sigev_notify_function accepts a union sigval value but not a pointer.
* Remove a redundant _get_curthread() call.davidxu2005-11-021-1/+0
|
* In raise(), use a shortcut to directly send signal to current thread.davidxu2005-11-021-7/+2
|
* Fix some comments, eliminate a memory leak.davidxu2005-11-011-6/+13
|
* Use TIMERS_UNLOCK.davidxu2005-11-011-1/+1
|
* Add code to handle timer_delete(). The timer wrapper code is completelydavidxu2005-11-013-68/+266
| | | | | | rewritten, now timers created with same sigev_notify_attributes will run in same thread, this allows user to organize which timers can run in same thread to save some thread resource.
* Add thread exit handler in timer_loop to handle broken buggy code whichdavidxu2005-10-301-1/+3
| | | | could lead to memory leak.
* Add timer_create wrapper.davidxu2005-10-301-0/+1
|
* Add experiment code to implement POSIX timer's SIGEV_THREAD notification.davidxu2005-10-261-0/+168
|
* Follow the change in kernel, joiner thread just waits at thread iddavidxu2005-10-262-6/+10
| | | | address, let kernel wake it up.
* Add functions pthread_mutexattr_setpshared and pthread_mutexattr_getpshared.davidxu2005-10-241-0/+28
|
* The pthread_attr_set_createsuspend_np was broken, fix it bydavidxu2005-10-101-1/+1
| | | | replacing THR_FLAGS_SUSPENDED with THR_FLAGS_NEED_SUSPEND.
* Add function pthread_timedjoin_np, the function is similar with pthread_joindavidxu2005-10-041-9/+49
| | | | | except the function will return ETIMEDOUT if target thread does not exit before specified absolute time passes.
* Include needed headers that were obtained through <pthread.h>. Sort headersstefanf2005-09-013-1/+4
| | | | while here.
* - Prefix MUTEX_TYPE_MAX with PTHREAD_ to avoid namespace pollution.stefanf2005-08-192-3/+3
| | | | | | - Remove the macros MUTEX_TYPE_FAST and MUTEX_TYPE_COUNTING_FAST. OK'ed by: deischen
* Add a cancellation point for usleep().deischen2005-08-031-0/+19
| | | | | While here, fix sleep() so that it is also a cancellation point (a missing weak reference prevented that).
* Cast to uintptr_t to avoid compiler warning, it was broken bydavidxu2005-07-281-6/+12
| | | | the recent atomic_ptr() change.
* Fix off-by-one nanosecond bug in macro TIMESPEC_ADD.davidxu2005-06-221-1/+1
| | | | | | Reviewed by: deischen Approved by: re (dwhite) MFC after : 4 days
* Use thr_new syscall to create a new thread, obscure context operationsdavidxu2005-04-231-24/+16
| | | | is no longer needed.
* Conditionally report initial thread event.davidxu2005-04-121-1/+2
|
* Add missing event reporting code.davidxu2005-04-121-0/+65
|
* Add debugger event reporting support, current only TD_CREATE and TD_DEATHdavidxu2005-04-127-11/+53
| | | | events are reported.
* Adjust hash function for smaller pthread structure size.davidxu2005-04-071-1/+1
|
* Remove unique id field which is no longer used by debugger.davidxu2005-04-063-15/+2
|
* Pass exact number of threads.davidxu2005-04-041-1/+1
|
* Import my recent 1:1 threading working. some features improved includes:davidxu2005-04-0249-4267/+5873
| | | | | | | | | | | | | | | | 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
* Increase the default stacksizes:marcus2005-03-063-15/+31
| | | | | | | | | 32-bit 64-bit main thread 2 MB 4 MB other threads 1 MB 2 MB Approved by: mtm Adapted from: libpthread
* Don't include sys/user.h merely for its side-effect of recursivelydas2004-11-273-2/+5
| | | | including other headers.
* 1. Now that it's a thread's state is changed from within the kernel, wheremtm2004-10-132-4/+10
| | | | | | | | | | | | | | no userland locks are heald, the dead thread lock can no longer protect access to it. Therefore, instead of using an if (!dead)...else clause after walking the active threads list test the thread pointer before deciding not to walk the dead threads list. If the thread pointer is null it means it was not found in the active threads list and the dead threads list should be checked. 2. Do not free the stack of a thread that is not marked dead. This is the 2nd and final part of eliminating the race to free a thread's stack. MFC after: 3 days
OpenPOWER on IntegriCloud