btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / private / userlandfs / shared / LazyInitializable.h
blob4d6892ced97fb99d3ecb3a024df4a771350f3f68
1 // LazyInitializable.h
3 #ifndef USERLAND_FS_LAZY_INITIALIZABLE_H
4 #define USERLAND_FS_LAZY_INITIALIZABLE_H
6 #include <OS.h>
8 namespace UserlandFSUtil {
10 class LazyInitializable {
11 public:
12 LazyInitializable();
13 LazyInitializable(bool init);
14 virtual ~LazyInitializable();
16 status_t Access();
17 status_t InitCheck() const;
19 protected:
20 virtual status_t FirstTimeInit() = 0;
22 protected:
23 status_t fInitStatus;
24 sem_id fInitSemaphore;
27 } // namespace UserlandFSUtil
29 using UserlandFSUtil::LazyInitializable;
31 #endif // USERLAND_FS_LAZY_INITIALIZABLE_H