kernel - Refactor the lwkt_token code, making it faster
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 21 Dec 2009 03:33:07 +0000 (19:33 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 21 Dec 2009 03:37:17 +0000 (19:37 -0800)
commitc6fbe95aea00066c24a4d2c2f84bb848374c08c7
tree4bc6de76c9c1326012382f98c30cf228b1116705
parentb71ff81a45d1506f8b5a9f0eb97e5a1c3308bede
kernel - Refactor the lwkt_token code, making it faster

* Rewrite the core token functions and revamp the structures.  The
  lwkt_token structure now contains just a single element, a pointer
  to the on-stack lwkt_tokref.  The lwkt_tokref now contains the
  owner id.

* Recursive tokens are still fully supported and coded trivially.

* Critical sections and spinlocks are no longer needed or used by
  the lwkt_token code.  Token aquisition is basically a single
  atomic_cmpset_ptr() call in the critical path.  Everything runs
  ultra clean now.

* Improve the pool token API.

* Remove extranious cruft
sys/ddb/db_ps.c
sys/kern/kern_lockf.c
sys/kern/lwkt_token.c
sys/sys/thread.h
sys/sys/thread2.h