Home | History | Annotate | Line # | Download | only in libpthread
TODO revision 1.1.2.11
      1   1.1.2.9  nathanw Bugs to fix:
      2   1.1.2.9  nathanw 
      3   1.1.2.9  nathanw - pthread_cond_timedwait() doesn't work if SA's aren't running yet,
      4   1.1.2.9  nathanw   because the alarm system isn't up and running. It would be weird to
      5   1.1.2.9  nathanw   use them that way, but it's perfectly legal.
      6   1.1.2.9  nathanw - There is a race between pthread_cancel() and
      7   1.1.2.9  nathanw   pthread_cond_broadcast() or pthread_exit() about removing an item
      8   1.1.2.9  nathanw   from the sleep queue. The locking protocols there need a little
      9   1.1.2.9  nathanw   adjustment.
     10  1.1.2.11  thorpej - pthread_sig.c: sigaction() currently hard-codes __sigtramp_sigcontext_1:
     11  1.1.2.11  thorpej   this is incorrect.  Instead of calling __sigaction_sigtramp() directly,
     12  1.1.2.11  thorpej   libc should export a __libc_sigaction14() which sigaction() can call.
     13  1.1.2.11  thorpej   Also, pthread_sig.c should probably be built with __LIBC12_SOURCE__ so
     14  1.1.2.11  thorpej   that the signal version of sigaction(), et al can be explicit.
     15  1.1.2.11  thorpej - pthread_sig.c: pthread__signal_tramp() is broken.  It gets a ucontext,
     16  1.1.2.11  thorpej   but then hands off an empty (garbage from stack!) sigcontext to the
     17  1.1.2.11  thorpej   handler.  The ucontext MUST be converted to a sigcontext, the handler
     18  1.1.2.11  thorpej   called, and then the sigcontext converted back to ucontext, before the
     19  1.1.2.11  thorpej   ucontext is used to perform the sigreturn-analogue.  This is necessary
     20  1.1.2.11  thorpej   for e.g. C++/Java exceptions and some garbage-collectors.
     21  1.1.2.11  thorpej - pthread_sig.c: pthread__signal_tramp() should be changed so that it is
     22  1.1.2.11  thorpej   easy to add support for SA_SIGINFO later.  (Mostly a function signature
     23  1.1.2.11  thorpej   issue.)
     24  1.1.2.11  thorpej - Consider moving pthread__signal_tramp() to its own file, and building
     25  1.1.2.11  thorpej   it with -fasync-unwind-tables, so that DWARF2 EH unwinding works through
     26  1.1.2.11  thorpej   it.  (This is required for e.g. GCC's libjava.)
     27  1.1.2.11  thorpej - locks: Add support for RAS on uniprocessors.
     28  1.1.2.11  thorpej - pthread_lock.c: pthread_spin_lock() should use a loop around
     29  1.1.2.11  thorpej   __cpu_simple_lock_try() so that it is easy to add support for RAS.
     30   1.1.2.9  nathanw 
     31   1.1.2.1  nathanw 
     32   1.1.2.3  nathanw Interfaces/features to implement:
     33   1.1.2.3  nathanw - pthread_kill()
     34   1.1.2.3  nathanw - pthread_atfork()
     35  1.1.2.11  thorpej - pthread_rwlock... These are currently stubbed to MUTEX in libc!!
     36   1.1.2.3  nathanw - priority scheduling
     37   1.1.2.3  nathanw - libc integration: 
     38   1.1.2.3  nathanw    - foo_r interfaces
     39   1.1.2.3  nathanw - system integration
     40   1.1.2.3  nathanw    - some macros and prototypes belong in headers other than pthread.h
     41   1.1.2.3  nathanw 
     42   1.1.2.3  nathanw 
     43   1.1.2.3  nathanw Features that need more/better regression tests:
     44   1.1.2.3  nathanw  - pthread_cond_broadcast()
     45   1.1.2.3  nathanw  - pthread_once()
     46   1.1.2.3  nathanw  - pthread_get/setspecific()
     47   1.1.2.3  nathanw  - signals
     48   1.1.2.3  nathanw 
     49   1.1.2.3  nathanw 
     50   1.1.2.3  nathanw Things that need fixing:
     51   1.1.2.3  nathanw - Recycle dead threads for new threads.
     52   1.1.2.3  nathanw 
     53   1.1.2.3  nathanw Ideas to play with:
     54   1.1.2.3  nathanw - Explore the trapcontext vs. usercontext distinction in ucontext_t.
     55   1.1.2.3  nathanw - Get rid of thread structures when too many accumulate (is this
     56   1.1.2.3  nathanw   actually a good idea?)
     57   1.1.2.3  nathanw - Adaptive spin/sleep locks for mutexes.
     58   1.1.2.1  nathanw - Supporting different mutex types would be nice (normal, debugging,
     59   1.1.2.1  nathanw   recursive, etc).
     60   1.1.2.1  nathanw - Currently, each thread uses two real pages of memory: one at the top
     61   1.1.2.1  nathanw   of the stack for actual stack data, and one at the bottom for the
     62   1.1.2.1  nathanw   pthread_st. If we can get suitable space above the initial stack for
     63   1.1.2.1  nathanw   main(), we can cut this to one page per thread. Perhaps crt0 should
     64   1.1.2.1  nathanw   do something different (give us more space) if libpthread is linked
     65   1.1.2.1  nathanw   in?
     66   1.1.2.1  nathanw - Figure out whether/how to expose the inline version of
     67   1.1.2.1  nathanw   pthread_self().
     68