[roll] Roll fuchsia [starnix] Refactor lockdep guards with tokens

This change refactors `LockDepGuard`, `LockDepReadGuard`, and
`LockDepWriteGuard` to own a `LockLevelToken` instead of manually
managing the lock state. This reduces code duplication and simplifies
the `lock()`, `read()`, and `write()` methods.

It also adds `LockLevelToken` and `assert_lock_level` to allow
asserting lock levels without creating a mutex, and adds tests for these
features.

`LockLevelToken` and `SubclassToken` are now defined in the `tracking`
module, allowing them to be zero-sized types with no-op methods when the
`detect_lock_dep_cycles` feature is disabled, reducing overhead.

Additionally, methods used only internally by these tokens are now
private to the `tracking` module and removed from the dummy
implementation.

Test: fx test starnix_sync-tests
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1575156
Original-Revision: d0faa7dbdf36f1374b6b3a52ede69d6faea0e21f
GitOrigin-RevId: c733f0f6903bbf9cb5c8a6f63517fc3e71d5cbc2
Change-Id: I1961128460b43d544fd29d85a66cd98731225e44
1 file changed
tree: 8dbac1b98f2f90c7bcfa543aff12addaf137f22e
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cobalt
  6. flower
  7. jiri.lock
  8. MILESTONE
  9. minimal
  10. prebuilts
  11. README.md
  12. stem
  13. test_durations
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance in one of the communication channels documented at get involved.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.