TODO 1007 B

12345678910111213141516171819202122232425262728293031
  1. - we should probably extend pthread_mutexattr_t with a field to create a
  2. single linked list of all instances. This requires changing the
  3. pthread_mutexattr_* functions.
  4. - a new attribute for mutexes: number of times we spin before calling
  5. sys_futex
  6. - for adaptive mutexes: when releasing, determine whether somebody spins.
  7. If yes, for a short time release lock. If someone else locks no wakeup
  8. syscall needed.
  9. - test with threaded process terminating and semadj (?) being applied
  10. only after all threads are gone
  11. - semaphore changes:
  12. - sem_post should only wake one thread and only when the state of
  13. the semaphore changed from 0 to 1
  14. this also requires that sem_wait and sem_timedwait don't drop the
  15. post if they get canceled.
  16. - possibly add counter field. This requires reviving the
  17. differences between old and new semaphose funtions. The old ones
  18. stay as they are now. The new once can use an additional field
  19. wich is the counter for the number of waiters