Rune - Fix thread bugs, add lock debugging
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 4 Mar 2018 05:33:27 +0000 (21:33 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 4 Mar 2018 05:41:12 +0000 (21:41 -0800)
commitca3825cdda65d4cf53e118105a4c1926d4ac026f
tree55d8d8a8b9d578d9fcb2b4b6f6f723896136a2aa
parent81e53c7d8175ae225baf292db430cfc20de19f8d
Rune - Fix thread bugs, add lock debugging

* Fix a number of thread-tracking bugs and races.  We have to set
  RUNNING a little earlier to prevent stolen locks from being stolen
  themselves while we are running.

* Fix a bug in the thread detach code which transfers some of the
  old thread's locks over to the new thread.  The lock count was
  getting mangled.

* Add thread debugging.

* Add lock debugging.
TODO
libruntime/lock.c
libruntime/lock2.h
libruntime/thread.c