attilio ce3b4baf3c Fix some bugs related to adaptive spinning:
In the lockmgr support:
- GIANT_RESTORE() is just called when the sleep finishes, so the current
  code can ends up into a giant unlock problem.  Fix it by appropriately
  call GIANT_RESTORE() when needed.  Note that this is not exactly ideal
  because for any interation of the adaptive spinning we drop and restore
  Giant, but the overhead should be not a factor.
- In the lock held in exclusive mode case, after the adaptive spinning is
  brought to completition, we should just retry to acquire the lock
  instead to fallthrough. Fix that.
- Fix a style nit

In the sx support:
- Call GIANT_SAVE() before than looping. This saves some overhead because
  in the current code GIANT_SAVE() is called several times.

Tested by:	Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
2009-09-02 17:33:51 +00:00
..
2003-06-11 00:56:59 +00:00
2003-06-11 00:56:59 +00:00
2009-05-18 12:03:43 +00:00
2009-05-27 16:36:54 +00:00
2008-09-22 10:37:02 +00:00
2009-05-29 14:25:51 +00:00
2009-08-23 09:55:06 +00:00
2009-05-20 02:51:48 +00:00
2009-08-23 20:26:09 +00:00
2009-08-23 08:04:40 +00:00
2009-05-26 09:19:21 +00:00