Copied userlandfs code from the test tree to the haiku source tree,
where it will be ported to Haiku. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20216 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
// LazyInitializable.h
|
||||
|
||||
#ifndef USERLAND_FS_LAZY_INITIALIZABLE_H
|
||||
#define USERLAND_FS_LAZY_INITIALIZABLE_H
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
namespace UserlandFSUtil {
|
||||
|
||||
class LazyInitializable {
|
||||
public:
|
||||
LazyInitializable();
|
||||
LazyInitializable(bool init);
|
||||
virtual ~LazyInitializable();
|
||||
|
||||
status_t Access();
|
||||
status_t InitCheck() const;
|
||||
|
||||
protected:
|
||||
virtual status_t FirstTimeInit() = 0;
|
||||
|
||||
protected:
|
||||
status_t fInitStatus;
|
||||
sem_id fInitSemaphore;
|
||||
};
|
||||
|
||||
} // namespace UserlandFSUtil
|
||||
|
||||
using UserlandFSUtil::LazyInitializable;
|
||||
|
||||
#endif // USERLAND_FS_LAZY_INITIALIZABLE_H
|
||||
Reference in New Issue
Block a user