Home | History | Annotate | Line # | Download | only in libpthread
TODO revision 1.4
      1  1.2   thorpej Bugs to fix:
      2  1.2   thorpej 
      3  1.3  jdolecek - some blocking routines (like sem_wait()) don't work if SA's aren't
      4  1.3  jdolecek   running yet, because the alarm system isn't up and running or there is no
      5  1.3  jdolecek   thread context to switch to. It would be weird to use them that
      6  1.3  jdolecek   way, but it's perfectly legal.
      7  1.2   thorpej - There is a race between pthread_cancel() and
      8  1.2   thorpej   pthread_cond_broadcast() or pthread_exit() about removing an item
      9  1.2   thorpej   from the sleep queue. The locking protocols there need a little
     10  1.2   thorpej   adjustment.
     11  1.4  christos - pthread_sig.c: pthread__kill_self() passes a bogus ucontext to the handler.
     12  1.4  christos   This is probably not very important.
     13  1.2   thorpej - pthread_sig.c: Come up with a signal trampoline naming convention like
     14  1.2   thorpej   libc's, so that GDB will have an easier time with things.
     15  1.2   thorpej - Consider moving pthread__signal_tramp() to its own file, and building
     16  1.2   thorpej   it with -fasync-unwind-tables, so that DWARF2 EH unwinding works through
     17  1.2   thorpej   it.  (This is required for e.g. GCC's libjava.)
     18  1.2   thorpej - Add locking to ld.elf_so so that multiple threads doing lazy binding
     19  1.2   thorpej   doesn't trash things.
     20  1.2   thorpej - Verify the cancel stub symbol trickery.
     21  1.2   thorpej 
     22  1.2   thorpej 
     23  1.2   thorpej Interfaces/features to implement:
     24  1.2   thorpej - pthread_atfork()
     25  1.2   thorpej - priority scheduling
     26  1.2   thorpej - libc integration: 
     27  1.2   thorpej    - foo_r interfaces
     28  1.2   thorpej - system integration
     29  1.2   thorpej    - some macros and prototypes belong in headers other than pthread.h
     30  1.2   thorpej 
     31  1.2   thorpej 
     32  1.2   thorpej Features that need more/better regression tests:
     33  1.2   thorpej  - pthread_cond_broadcast()
     34  1.2   thorpej  - pthread_once()
     35  1.2   thorpej  - pthread_get/setspecific()
     36  1.2   thorpej  - signals
     37  1.2   thorpej 
     38  1.2   thorpej 
     39  1.2   thorpej Things that need fixing:
     40  1.2   thorpej - Recycle dead threads for new threads.
     41  1.2   thorpej 
     42  1.2   thorpej Ideas to play with:
     43  1.2   thorpej - Explore the trapcontext vs. usercontext distinction in ucontext_t.
     44  1.2   thorpej - Get rid of thread structures when too many accumulate (is this
     45  1.2   thorpej   actually a good idea?)
     46  1.2   thorpej - Adaptive spin/sleep locks for mutexes.
     47  1.2   thorpej - Currently, each thread uses two real pages of memory: one at the top
     48  1.2   thorpej   of the stack for actual stack data, and one at the bottom for the
     49  1.2   thorpej   pthread_st. If we can get suitable space above the initial stack for
     50  1.2   thorpej   main(), we can cut this to one page per thread. Perhaps crt0 should
     51  1.2   thorpej   do something different (give us more space) if libpthread is linked
     52  1.2   thorpej   in?
     53  1.2   thorpej - Figure out whether/how to expose the inline version of
     54  1.2   thorpej   pthread_self().
     55  1.2   thorpej - Along the same lines, figure out whether/how to use registers reserved
     56  1.2   thorpej   in the ABI for thread-specific-data to implement pthread_self().
     57  1.4  christos - Figure out what to do with changing stack sizes.
     58