This file describes use of resources and spin locks with the netware
redirector.  There are 2 major sections - global locks, and per structure
locks.  Each subsection names a lock or resources and list all of the
global variable, and structure fields it protects.


1.  Global Locks

1.1  ScbSpinLock
	- ScbQueue
	- NpScb fields -> ScbLinks
        - Nearest server table.

1.2  Rcb->Resource
        - ServerNameTable
	- FileNameTable, Fcb->PrefixEntry
	- Rcb fields -> OpenCount
	- Synchronize access to newly created FCBs
	- DefaultUserName, DefaultPassword, DefaultServerName.
	- Fcb->IcbList, Icb->ListEntry
	- DriveMapTable
	- Vcb->ReferenceCount, Vcb->FcbList, Vcb->FcbCount, GlobalVcbListEntry
	- Scb->ScbSpecificVcbQueue, Scb->VcbCount, OpenFileCount, AttachCount
	- GlobalVcbList, CurrentVcbEntry

1.3  NwScavengerSpinLock
        - NwScavengerTickCount

1.4  Front of the SCB queue
        - Icb->State, HasRemoteHandle
	- NpScb->State
        - pScb->UserName, pScb->Password

1.5  NwMessageSpinLock
	- NwGetMessageList

1.6  NwPendingLockSpinLock
	- NwPendingLockList

1.7  NwFcbTableResource
        - FCB / ICB creation.
	
2.  Per structure locks

2.1   SCB->NpScbSpinLock
          - NpScb fields -> Sending, Receiving, OkToReceive, TimeOut,
			    MaxTimeOut, Requests, RetryCount, Reference

2.2  FCB->Resource
	  - Fcb->  FileSize, Attributes, LastModifiedDate, LastModifiedTime
	           State, FileLockList, PendingLockList,
          - Icb->FileLockList

In order to eliminate dead locks, locks should be acquired in the following
order (if multiple locks are needed).

RCB->Resource
FCB->Resource
NwScavengerSpinLock
ScbSpinLock
SCB->NpScbSpinLock

A thread cannot wait for the SCB queue while holding any other lock.

