Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.1 KiB

  1. This file describes use of resources and spin locks with the netware
  2. redirector. There are 2 major sections - global locks, and per structure
  3. locks. Each subsection names a lock or resources and list all of the
  4. global variable, and structure fields it protects.
  5. 1. Global Locks
  6. 1.1 ScbSpinLock
  7. - ScbQueue
  8. - NpScb fields -> ScbLinks
  9. - Nearest server table.
  10. 1.2 Rcb->Resource
  11. - ServerNameTable
  12. - FileNameTable, Fcb->PrefixEntry
  13. - Rcb fields -> OpenCount
  14. - Synchronize access to newly created FCBs
  15. - DefaultUserName, DefaultPassword, DefaultServerName.
  16. - Fcb->IcbList, Icb->ListEntry
  17. - DriveMapTable
  18. - Vcb->ReferenceCount, Vcb->FcbList, Vcb->FcbCount, GlobalVcbListEntry
  19. - Scb->ScbSpecificVcbQueue, Scb->VcbCount, OpenFileCount, AttachCount
  20. - GlobalVcbList, CurrentVcbEntry
  21. - LogonList
  22. 1.3 NwScavengerSpinLock
  23. - NwScavengerTickCount
  24. 1.4 Front of the SCB queue
  25. - Icb->State, HasRemoteHandle
  26. - NpScb->State
  27. - pScb->UserName, pScb->Password
  28. - Fcb->FileSize (except during create)
  29. 1.5 NwMessageSpinLock
  30. - NwGetMessageList
  31. 1.6 NwPendingLockSpinLock
  32. - NwPendingLockList
  33. 1.7 NwFcbTableResource
  34. - FCB / ICB creation.
  35. 2. Per structure locks
  36. 2.1 SCB->NpScbSpinLock
  37. - NpScb fields -> Sending, Receiving, OkToReceive, TimeOut,
  38. MaxTimeOut, Requests, RetryCount, Reference
  39. 2.2 FCB->Resource
  40. - Fcb-> Attributes, LastModifiedDate, LastModifiedTime
  41. State, FileLockList, PendingLockList,
  42. 2.3 Front of the SCB queue
  43. - Icb->FileLockList
  44. 2.4 LOGON->CredListResource
  45. Protects the credentials on the cred list
  46. and the list pointers. Acquire shared for
  47. read access to the list. Acquire exclusive
  48. for write access to the list.
  49. In order to eliminate dead locks, locks should be acquired in the following
  50. order (if multiple locks are needed).
  51. RCB->Resource
  52. FCB->Resource
  53. NwScavengerSpinLock
  54. LOGON->CredListResource
  55. ScbSpinLock
  56. SCB->NpScbSpinLock
  57. A thread cannot wait for the SCB queue while holding any other lock.