| Commit message (Collapse) | Author | Age | Files | Lines | ||
|---|---|---|---|---|---|---|
| ... | ||||||
| * | pthread_self() may be much cheaper and never more expensive than getthrid() | 2011-12-28 | 1 | -2/+3 | ||
| | | | | | so prefer it for identifying the current thread | |||||
| * | On failure, pthread_kill() should return the errno, not -1 | 2011-12-27 | 1 | -2/+2 | ||
| | | ||||||
| * | Mark sigthr()'s sig argument as __unused | 2011-12-05 | 1 | -2/+2 | ||
| | | ||||||
| * | Implement cancelation for the basic syscall cancelation points, | 2011-12-05 | 1 | -4/+40 | ||
| | | | | | | | using previously allocated SIGTHR to interrupt in-process syscalls and fixing the spelling of "cancelled" along the way. Modeled on FreeBSD's libthr | |||||
| * | Oh yeah, with TLS-lite we can get the thread handle without walking the | 2011-11-09 | 1 | -23/+2 | ||
| | | | | | | | thread list reminded by dhill@ | |||||
| * | Move <machine/spinlock.h> into rthread.h; strip out unnecessary #includes | 2011-11-06 | 1 | -9/+2 | ||
| | | ||||||
| * | Use __tfork, __get_tcb, and __set_tcb to have a real TCB and per-thread | 2011-10-17 | 1 | -29/+60 | ||
| | | | | | | errno. The ASM bits for _cerror are sketchy or missing for some archs but that can be corrected in-tree. | |||||
| * | Convert thrsleep() to an absolute timeout with clockid to eliminate a | 2009-11-27 | 1 | -2/+2 | ||
| | | | | | | | race condition and prep for later support of pthread_condattr_setclock() "get it in" deraadt@, tedu@, cheers by others | |||||
| * | Change threxit() to take a pointer to a pid_t to zero out from the | 2009-11-27 | 1 | -22/+38 | ||
| | | | | | | | | | | | kernel so that librthread can detect when a thread is completely done with its stack without need a kqueue. The dying thread moves itself to a GC list, other threads scan the GC list on pthread_create() and pthread_join() and free the stack and handle once the thread's thread id is zeroed. "get it in" deraadt@, tedu@, cheers by others | |||||
| * | Fix a race in the reaper discovered by Tobias Ulmer. kevents are identified by pid, | 2009-02-20 | 1 | -2/+3 | ||
| | | | | | | | | | so in the event that two threads get the same pid in a row, as the second is dying it will update (not add) the kevent for the previous thread with its own stack, which it will then unmap soon after, which is bad. Doing the reaping first guarantees that there are no kevents with the same pid as the exiting thread when it registers itself. ok guenther kurt | |||||
| * | use calloc() instead of malloc() and memset() | 2008-10-13 | 1 | -5/+3 | ||
| | | | | | "look good" tedu@ | |||||
| * | Match libpthread's behavior and make pthread_join(NULL, whatever) fail | 2008-08-14 | 1 | -2/+4 | ||
| | | | | | | | | instead of crashing ok kurt@ first observed by Jung <moorang at gmail.com> | |||||
| * | Fix 5771/library: in pthread_exit(), delay the call to _sem_post() that | 2008-08-14 | 1 | -4/+4 | ||
| | | | | | | | | | | unblocks the pthread_join() for this thread until the exiting thread is completely done with its thread structure, as the joining thread will free it once unblocked. Also, don't bother to call _sem_post() if the thread is detached. ok kurt@ | |||||
| * | If the initial thread calls pthread_exit(), don't overwrite its thread | 2008-08-14 | 1 | -3/+5 | ||
| | | | | | | structure, as the 'tid' member there is used by other parts of librthread to determine whether the current thread is the initial thread | |||||
| * | - Add fork/vfork wrapper functions to reset state in the child process. | 2008-06-05 | 1 | -18/+23 | ||
| | | | | | | | | | | | | - Make an effort to protect important libc and ld.so critical areas during the fork(2)/vfork(2) sys call. - Add pthread_atfork(3) implementation based on Daniel Eischen's code. Original diff by Philip Guenther <guenther at gmail.com> with some additions and refinements by me. Positive test report from brad@ with many kde apps. fork(2) and pthread_atfork(3) pthread regresses pass. okay tedu@, kettenis@, marc@ | |||||
| * | Register the locking hooks with ld.so. | 2007-05-18 | 1 | -1/+45 | ||
| | | | | | drahn@ ok (long time ago) | |||||
| * | Initialize thread debug in _rthread_init. The debug verbosity | 2006-01-06 | 1 | -1/+3 | ||
| | | | | | | can be set in the environment using RTHREAD_DEBUG. ok, tedu@ | |||||
| * | guess it's time to remove the init printf; sturm found a port that | 2006-01-06 | 1 | -3/+1 | ||
| | | | | | didn't like it. | |||||
| * | In pthread_join(), check if we create a deadlock trying to join | 2006-01-05 | 1 | -7/+9 | ||
| | | | | | with ourself and only free thread after a succesful join. ok marc@ | |||||
| * | move malloc lock to libc interface file | 2006-01-05 | 1 | -23/+1 | ||
| | | ||||||
| * | add -Wstrict-prototypes -Wmissing-prototypes -Wsign-compare | 2006-01-05 | 1 | -4/+5 | ||
| | | | | | | | Minor tweaks to compile with the above, primarily in fixing the conflicts between semaphore.h and rthread.h "i like the additional warnings" tedu@ | |||||
| * | Cleanup struct pthread and stack after thread exits. This version does | 2006-01-04 | 1 | -20/+73 | ||
| | | | | | not use a separate reaper thread. ok tedu@ marc@ | |||||
| * | allow threads to be created in a detached state | 2006-01-04 | 1 | -5/+13 | ||
| | | | | | | do not allow a join to a detached thread "it looks good" otto@ | |||||
| * | thread stack handling changes. Add guard zones and allow stack | 2006-01-01 | 1 | -36/+7 | ||
| | | | | | | | | | size (and guard zone size) to be set using pthread_attr. Guard zones are specified in bytes, but implemented in terms of a page size. OK Otto@ | |||||
| * | Implement suspend/resume and creation of initially suspended threads. | 2005-12-31 | 1 | -6/+16 | ||
| | | | | | | With this, java seems to be operational. Also make threads_ready non-static, which is needed for an upcoming diff. ok tedu@ | |||||
| * | Remove exitinng thread from the list of threads. ok tedu@ | 2005-12-30 | 1 | -1/+4 | ||
| | | ||||||
| * | use queue.h macros for thread house keeping; make some vars non-static | 2005-12-30 | 1 | -20/+19 | ||
| | | | | | and fix a bug in thread creation error path. ok tedu@ | |||||
| * | __aligned__ isn't really necessary on the struct, an aligned member | 2005-12-30 | 1 | -2/+2 | ||
| | | | | | will make the right thing happen. verified by kettenis and drahn | |||||
| * | prototype all the thread syscalls in rthread.h for now. | 2005-12-30 | 1 | -3/+1 | ||
| | | | | | update for new thrwakeup that takes a count argument | |||||
| * | Put the existing _np functions into separate file; introduce | 2005-12-29 | 1 | -26/+3 | ||
| | | | | | | pthread_stackseg_np(), from existing pthread lib. discussed with tedu@ ok marc@ | |||||
| * | implement pthread_main_np(); ok tedu@ | 2005-12-29 | 1 | -1/+13 | ||
| | | ||||||
| * | for reasons that do not make any sense whatsoever, _rthread_alloc_stack | 2005-12-23 | 1 | -9/+9 | ||
| | | | | | must be called with the thread_lock held, or we crash in rfork_thread | |||||
| * | more consistently use _rthread prefix for all not meant to be exported | 2005-12-22 | 1 | -15/+15 | ||
| | | | | | interfaces that aren't static, and a few that are but which will change | |||||
| * | change init code to handle failure. (actually, make it impossible to fail, | 2005-12-22 | 1 | -13/+14 | ||
| | | | | | | but still have the callers check for good measure). prompted by miod "err() in a library???" | |||||
| * | Bad commit, breaks hppa64. Prompted by deraadt@ | 2005-12-22 | 1 | -3/+2 | ||
| | | ||||||
| * | Align hppa stack to 64 bytes. | 2005-12-21 | 1 | -2/+3 | ||
| | | | | | ok tedu | |||||
| * | make alloc_stack take an optional base, preparation for stack attributes | 2005-12-21 | 1 | -7/+16 | ||
| | | | | | deal with machines that have upside down stacks | |||||
| * | check a few remaining mallocs for failure, along with mmap and rfork | 2005-12-21 | 1 | -4/+41 | ||
| | | | | | started by miod | |||||
| * | fix rev 1.9 | 2005-12-19 | 1 | -2/+2 | ||
| | | | | | pthread_concurrency -> pthread_setconcurrency | |||||
| * | update copyright to 2005 | 2005-12-19 | 1 | -2/+2 | ||
| | | ||||||
| * | add pthread_get/set_concurrency (useless for now) | 2005-12-19 | 1 | -1/+18 | ||
| | | | | | add pthread_get/set_stack[addr] (info not used yet) | |||||
| * | initialize all spinlocks to _SPINLOCK_UNLOCKED | 2005-12-18 | 1 | -3/+5 | ||
| | | ||||||
| * | add pthread_cleanup_push and pthread_cleanup_pop | 2005-12-14 | 1 | -1/+39 | ||
| | | ||||||
| * | add pthread_kill (just kill(2) really) | 2005-12-14 | 1 | -1/+7 | ||
| | | ||||||
| * | add bits for pthread_cancel. we don't really have cancellation points yet | 2005-12-14 | 1 | -1/+64 | ||
| | | | | | but some of the functions are here now. | |||||
| * | change keys to use table instead of list, makes a sane destructor implementation | 2005-12-14 | 1 | -2/+5 | ||
| | | | | | possible | |||||
| * | correct implementation of pthread_cond_signal. it doesn't raise the sem | 2005-12-13 | 1 | -4/+2 | ||
| | | | | | value if there are no waiters. | |||||
| * | syscall is actually sched_yield now, as millert suggested | 2005-12-03 | 1 | -2/+1 | ||
| | | ||||||
| * | add userland thread library. incomplete, but functional | 2005-12-03 | 1 | -0/+265 | ||
