TODO revision 1.1.2.16 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: pthread__signal_tramp() is broken. It gets a ucontext,
11 1.1.2.11 thorpej but then hands off an empty (garbage from stack!) sigcontext to the
12 1.1.2.11 thorpej handler. The ucontext MUST be converted to a sigcontext, the handler
13 1.1.2.11 thorpej called, and then the sigcontext converted back to ucontext, before the
14 1.1.2.11 thorpej ucontext is used to perform the sigreturn-analogue. This is necessary
15 1.1.2.11 thorpej for e.g. C++/Java exceptions and some garbage-collectors.
16 1.1.2.11 thorpej - pthread_sig.c: pthread__signal_tramp() should be changed so that it is
17 1.1.2.11 thorpej easy to add support for SA_SIGINFO later. (Mostly a function signature
18 1.1.2.11 thorpej issue.)
19 1.1.2.15 thorpej - pthread_sig.c: Come up with a signal trampoline naming convention like
20 1.1.2.15 thorpej libc's, so that GDB will have an easier time with things.
21 1.1.2.11 thorpej - Consider moving pthread__signal_tramp() to its own file, and building
22 1.1.2.11 thorpej it with -fasync-unwind-tables, so that DWARF2 EH unwinding works through
23 1.1.2.11 thorpej it. (This is required for e.g. GCC's libjava.)
24 1.1.2.11 thorpej - locks: Add support for RAS on uniprocessors.
25 1.1.2.11 thorpej - pthread_lock.c: pthread_spin_lock() should use a loop around
26 1.1.2.11 thorpej __cpu_simple_lock_try() so that it is easy to add support for RAS.
27 1.1.2.12 thorpej - Add locking to ld.elf_so so that multiple threads doing lazy binding
28 1.1.2.12 thorpej doesn't trash things.
29 1.1.2.13 thorpej - Verify the cancel stub symbol trickery.
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.3 nathanw - priority scheduling
36 1.1.2.3 nathanw - libc integration:
37 1.1.2.3 nathanw - foo_r interfaces
38 1.1.2.3 nathanw - system integration
39 1.1.2.3 nathanw - some macros and prototypes belong in headers other than pthread.h
40 1.1.2.3 nathanw
41 1.1.2.3 nathanw
42 1.1.2.3 nathanw Features that need more/better regression tests:
43 1.1.2.3 nathanw - pthread_cond_broadcast()
44 1.1.2.3 nathanw - pthread_once()
45 1.1.2.3 nathanw - pthread_get/setspecific()
46 1.1.2.3 nathanw - signals
47 1.1.2.3 nathanw
48 1.1.2.3 nathanw
49 1.1.2.3 nathanw Things that need fixing:
50 1.1.2.3 nathanw - Recycle dead threads for new threads.
51 1.1.2.3 nathanw
52 1.1.2.3 nathanw Ideas to play with:
53 1.1.2.3 nathanw - Explore the trapcontext vs. usercontext distinction in ucontext_t.
54 1.1.2.3 nathanw - Get rid of thread structures when too many accumulate (is this
55 1.1.2.3 nathanw actually a good idea?)
56 1.1.2.3 nathanw - Adaptive spin/sleep locks for mutexes.
57 1.1.2.1 nathanw - Supporting different mutex types would be nice (normal, debugging,
58 1.1.2.1 nathanw recursive, etc).
59 1.1.2.1 nathanw - Currently, each thread uses two real pages of memory: one at the top
60 1.1.2.1 nathanw of the stack for actual stack data, and one at the bottom for the
61 1.1.2.1 nathanw pthread_st. If we can get suitable space above the initial stack for
62 1.1.2.1 nathanw main(), we can cut this to one page per thread. Perhaps crt0 should
63 1.1.2.1 nathanw do something different (give us more space) if libpthread is linked
64 1.1.2.1 nathanw in?
65 1.1.2.1 nathanw - Figure out whether/how to expose the inline version of
66 1.1.2.1 nathanw pthread_self().
67