haiku/headers/private/userlandfs/shared/LazyInitializable.h
Ingo Weinhold 83812f6752 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
2007-02-24 00:30:19 +00:00

32 lines
588 B
C++

// 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