Age | Commit message (Collapse) | Author | |
---|---|---|---|
2007-06-05 | _FD_LOCK/UNLOCK() is libpthread specific and not needed for librthread, so | Kurt Miller | |
isolate its usage to libpthread only and replace with generic non-static mutex support in the one place it is needed: - remove _FD_LOCK/UNLOCK from lseek and ftruncate in libc and make the functions weak so that libpthread can override with its own new versions that do the locking. - remove _thread_fd_lock/unlock() weak functions from libc and adjust libpthread for the change. - add generic _thread_mutex_lock/unlock/destroy() weak functions in libc to support non-static mutexes in libc and add libpthread and librthread implementations for them. libc can utilize non-static mutexes via the new _MUTEX_LOCK/UNLOCK/DESTROY() macros. Actually these new macros can support both static and non-static mutexes but currently only using them for non-static. - make opendir/closedir/readdir/readdir_r/seekdir/telldir() thread-safe for both thread libraries by using a non-static mutex in the struct _dirdesc (typedef DIR), utilizing it in the *dir functions and remove remaining and incorrect _FD_LOCK/UNLOCK() use in libc. - add comments to both thread libraries to indicate libc depends on the current implementation of static mutex initialization. suggested by marc@ - major bump libc and libpthread due to function removal, structure change and weak symbol conversions. okay marc@, tedu@ | |||
2007-05-25 | protect against races while initializing static mutexes. okay marc@ tedu@ | Kurt Miller | |
2007-05-18 | Register the locking hooks with ld.so. | Artur Grabowski | |
drahn@ ok (long time ago) | |||
2007-04-10 | when kevent fails, the errno is a lot more interesting to print than -1 | Ted Unangst | |
2007-04-10 | new lines in error messages | Ted Unangst | |
2007-03-24 | rfork sh bits. | Miod Vallat | |
2006-10-27 | two comment typos from tbert | Ted Unangst | |
2006-04-12 | make rthreads compile again | Henning Brauer | |
pthreads header changed, char * -> const char * | |||
2006-01-06 | When suspending, check the tid of the arg, not of ourselves, doh | Otto Moerbeek | |
2006-01-06 | Initialize thread debug in _rthread_init. The debug verbosity | Marco S Hyman | |
can be set in the environment using RTHREAD_DEBUG. ok, tedu@ | |||
2006-01-06 | guess it's time to remove the init printf; sturm found a port that | Ted Unangst | |
didn't like it. | |||
2006-01-05 | Use the system include <spinlock.h> to get the proper function | Marco S Hyman | |
prototype for _atomic_lock | |||
2006-01-05 | In pthread_join(), check if we create a deadlock trying to join | Otto Moerbeek | |
with ourself and only free thread after a succesful join. ok marc@ | |||
2006-01-05 | Fixup stack, it needs 16 bytes headroom. Help from miod@ and drahn. | Otto Moerbeek | |
ok drahn@ | |||
2006-01-05 | Remove redundant mprotect() calls (we're unmapping the region anyway) | Otto Moerbeek | |
and check user stack for proper alignment. ok tedu@ marc@ | |||
2006-01-05 | move malloc lock to libc interface file | Ted Unangst | |
2006-01-05 | add -Wstrict-prototypes -Wmissing-prototypes -Wsign-compare | Marco S Hyman | |
Minor tweaks to compile with the above, primarily in fixing the conflicts between semaphore.h and rthread.h "i like the additional warnings" tedu@ | |||
2006-01-04 | Cleanup struct pthread and stack after thread exits. This version does | Otto Moerbeek | |
not use a separate reaper thread. ok tedu@ marc@ | |||
2006-01-04 | allow threads to be created in a detached state | Marco S Hyman | |
do not allow a join to a detached thread "it looks good" otto@ | |||
2006-01-02 | Don't call pthread_self()->tid when getthrid() will do fine. | Otto Moerbeek | |
2006-01-01 | thread stack handling changes. Add guard zones and allow stack | Marco S Hyman | |
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@ | |||
2006-01-01 | Nicer implementation of pthread_main_np(), which avoids the spinlock. | Otto Moerbeek | |
ok tedu@ marc@ | |||
2005-12-31 | Add "print debug foo" function safe to use in signal handlers, example: | Marco S Hyman | |
_rthread_debug(3, "foo = %s", foo); where output is to stderr and will only be printed if the current debug level is >= 3. Messages with a debug level of 0 are always printed. The level can be set from the environment (not enabled yet) or with gdb by modifying variable _rthread_debug_level. "Fine with me" -Otto | |||
2005-12-31 | No point in saving a bunch of extra registers, and the child's state must | Dale Rahn | |
be fully saved in resisters, if left on the parents stack, it could be overwritten before the child runs. pointed out by miod. | |||
2005-12-31 | add pthread_mutexattr_gettype. | Brad Smith | |
ok otto@ | |||
2005-12-31 | Implement suspend/resume and creation of initially suspended threads. | Otto Moerbeek | |
With this, java seems to be operational. Also make threads_ready non-static, which is needed for an upcoming diff. ok tedu@ | |||
2005-12-30 | Remove exitinng thread from the list of threads. ok tedu@ | Otto Moerbeek | |
2005-12-30 | use queue.h macros for thread house keeping; make some vars non-static | Otto Moerbeek | |
and fix a bug in thread creation error path. ok tedu@ | |||
2005-12-30 | __aligned__ isn't really necessary on the struct, an aligned member | Ted Unangst | |
will make the right thing happen. verified by kettenis and drahn | |||
2005-12-30 | prototype all the thread syscalls in rthread.h for now. | Ted Unangst | |
update for new thrwakeup that takes a count argument | |||
2005-12-29 | Put the existing _np functions into separate file; introduce | Otto Moerbeek | |
pthread_stackseg_np(), from existing pthread lib. discussed with tedu@ ok marc@ | |||
2005-12-29 | implement pthread_main_np(); ok tedu@ | Otto Moerbeek | |
2005-12-29 | the story in pthread_rwlockattr_destory() shoudl be destroyed | Otto Moerbeek | |
2005-12-28 | remainder of the hppa support code for librthread. ok&help kettenis@ mickey@ | Miod Vallat | |
2005-12-25 | sparc64 support code for librthread (_atomic_lock yanked from existing | Miod Vallat | |
libpthread code). | |||
2005-12-25 | sparc support code for librthread (_atomic_lock yanked from existing | Miod Vallat | |
libpthread code). | |||
2005-12-25 | remove silly alpha comment | Ted Unangst | |
2005-12-25 | child calls threxit after thread return | Ted Unangst | |
2005-12-25 | put the error handling jump code back in from brad/marco | Ted Unangst | |
call right sycall after threadfn return | |||
2005-12-25 | if the start routine returns (never happens), call the right threxit syscall | Ted Unangst | |
2005-12-25 | A better implementation which does not use the caller's stack and thus is not | Miod Vallat | |
raceable. | |||
2005-12-25 | add rfork_thread for alpha, from kudo takashi | Ted Unangst | |
2005-12-24 | mips64 support code for librthread (_atomic_lock yanked from existing | Miod Vallat | |
libpthread code). | |||
2005-12-23 | m88k suppport code for librthread. | Miod Vallat | |
2005-12-23 | vax support bits for librthread (need the child_return() fix just commited). | Miod Vallat | |
2005-12-23 | m68k support code for librthread; atomic lock routine borrowed from the | Miod Vallat | |
existing libpthread code. | |||
2005-12-23 | for reasons that do not make any sense whatsoever, _rthread_alloc_stack | Ted Unangst | |
must be called with the thread_lock held, or we crash in rfork_thread | |||
2005-12-22 | add a missing underscore to the function name rthread_tls_destructors(). | Brad Smith | |
2005-12-22 | more consistently use _rthread prefix for all not meant to be exported | Ted Unangst | |
interfaces that aren't static, and a few that are but which will change | |||
2005-12-22 | change init code to handle failure. (actually, make it impossible to fail, | Ted Unangst | |
but still have the callers check for good measure). prompted by miod "err() in a library???" |