summaryrefslogtreecommitdiff
path: root/lib/libpthread/TODO
blob: 89915e9917beeff0167ce7ec4b234943829d9796 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$NetBSD: TODO,v 1.11 2007/09/08 23:00:31 ad Exp $

Bugs to fix:

- Add locking to ld.elf_so so that multiple threads doing lazy binding
  doesn't trash things.

Interfaces/features to implement:

- Realtime exensions: priority scheduling, priority inheritance.

- Figure out how to use registers reserved in the ABI to implement
  pthread_self(). This will allow for assembly lock stubs.

- Allow threads to change their stack size. This probably depends on the
  above item.

- Have a user/kernel shared page that:

  o Has a hint mechanism that gives us a clue about whether an LWP is
    currently running on another CPU. This could be used for adaptive locks,
    but would need to be cheap to do in-kernel.

  o Perhaps has a flag value that's reset when a detached LWP is into the
    kernel and lwp_exit1(), meaning that its stack can be reclaimed. Again,
    may or may not be worth it. Currently we test for this with _lwp_kill()
    which is very inefficient.

- Keep a pool of dead LWPs so that we do not have take the full hit of
  _lwp_create() every time pthread_create() is called.