[gn][fs-host] Satisfy TA_GUARDED in FileSizeRecorder

Pending host gn build enables more warnings, and it doesn't like null
checks or OpenFileSize() without holding the guard.

[8874->872/9803 ~58] CXX host-x64-linux-clang/obj/system/ulib/fs-host/libfs-host.file_size_recorder.cpp.o
../system/ulib/fs-host/file_size_recorder.cpp:15:9: warning: reading variable 'sizes_file_' requires holding mutex 'sizes_file_lock_' [-Wthread-safety-analysis]
    if (sizes_file_)
        ^
../system/ulib/fs-host/file_size_recorder.cpp:17:5: warning: reading variable 'sizes_file_' requires holding mutex 'sizes_file_lock_' [-Wthread-safety-analysis]
    sizes_file_.reset(open(path, O_CREAT|O_TRUNC|O_WRONLY, 0644));
    ^
../system/ulib/fs-host/file_size_recorder.cpp:18:17: warning: reading variable 'sizes_file_' requires holding mutex 'sizes_file_lock_' [-Wthread-safety-analysis]
    return bool{sizes_file_};
                ^
../system/ulib/fs-host/file_size_recorder.cpp:22:8: warning: reading variable 'sizes_file_' requires holding mutex 'sizes_file_lock_' [-Wthread-safety-analysis]
  if (!sizes_file_) {
       ^
4 warnings generated.

ZX-3415 #comment [gn][fs-host] Satisfy TA_GUARDED in FileSizeRecorder

Test: CQ
Change-Id: I1bd7ad4c17acfc7dd6947e52ea895c0fa2d3a31b
1 file changed
tree: 2fe80a622967028bedcc18e116e45da87e8d93d0
  1. boards/
  2. build/
  3. buildtools/
  4. bundles/
  5. docs/
  6. garnet/
  7. peridot/
  8. products/
  9. scripts/
  10. sdk/
  11. src/
  12. zircon/
  13. .clang-format
  14. .dir-locals.el
  15. .gitattributes
  16. .gitignore
  17. AUTHORS
  18. CODE_OF_CONDUCT.md
  19. CONTRIBUTING.md
  20. LICENSE
  21. OWNERS
  22. PATENTS
  23. README.md
  24. rustfmt.toml
README.md

Fuchsia

Pink + Purple == Fuchsia (a new operating system)

What is Fuchsia?

Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.

Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See the documentation.