From aa085ffef993707b59f861a32404f1fca50055e9 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 5 Mar 2009 23:27:35 +0000 Subject: [PATCH] * Removed UserlandFS shared Locker class. Instead use BLocker in userland and RecursiveLock in the kernel. * Several adjustments according to UserlandFS header changes. * Re-added reiserfs to image. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29410 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- build/jam/HaikuImage | 2 +- headers/private/userlandfs/shared/Locker.h | 72 ++--- .../kernel/file_systems/ramfs/Attribute.h | 10 +- .../file_systems/ramfs/AttributeIndexImpl.cpp | 8 +- .../file_systems/ramfs/AttributeIterator.h | 5 +- .../file_systems/ramfs/BlockAllocator.cpp | 2 +- .../file_systems/ramfs/BlockAllocatorArea.h | 6 +- .../ramfs/BlockAllocatorAreaBucket.cpp | 2 +- .../ramfs/BlockAllocatorAreaBucket.h | 10 +- .../kernel/file_systems/ramfs/Directory.cpp | 17 +- .../kernel/file_systems/ramfs/Directory.h | 6 +- src/add-ons/kernel/file_systems/ramfs/Entry.h | 18 +- .../kernel/file_systems/ramfs/EntryIterator.h | 4 +- src/add-ons/kernel/file_systems/ramfs/Jamfile | 3 +- .../file_systems/ramfs/LastModifiedIndex.cpp | 8 +- .../kernel/file_systems/ramfs/Node.cpp | 18 +- src/add-ons/kernel/file_systems/ramfs/Node.h | 6 +- src/add-ons/kernel/file_systems/ramfs/Query.h | 5 +- .../kernel/file_systems/ramfs/SizeIndex.cpp | 8 +- .../kernel/file_systems/ramfs/Volume.cpp | 6 +- .../kernel/file_systems/ramfs/Volume.h | 9 +- .../file_systems/ramfs/kernel_interface.cpp | 3 +- .../kernel/file_systems/reiserfs/Jamfile | 6 +- .../userlandfs/kernel_add_on/Jamfile | 1 - .../file_systems/userlandfs/server/Jamfile | 1 - .../userlandfs/server/haiku/Jamfile | 1 + .../file_systems/userlandfs/shared/Locker.cpp | 303 ------------------ .../userlandfs/r5/src/test/ramfs/Attribute.h | 10 +- .../r5/src/test/ramfs/AttributeIndexImpl.cpp | 8 +- .../r5/src/test/ramfs/AttributeIterator.h | 5 +- .../r5/src/test/ramfs/BlockAllocator.cpp | 2 +- .../r5/src/test/ramfs/BlockAllocatorArea.h | 6 +- .../test/ramfs/BlockAllocatorAreaBucket.cpp | 2 +- .../src/test/ramfs/BlockAllocatorAreaBucket.h | 10 +- .../r5/src/test/ramfs/Directory.cpp | 17 +- .../userlandfs/r5/src/test/ramfs/Directory.h | 6 +- .../userlandfs/r5/src/test/ramfs/Entry.h | 19 +- .../r5/src/test/ramfs/EntryIterator.h | 4 +- .../userlandfs/r5/src/test/ramfs/Jamfile | 1 - .../r5/src/test/ramfs/LastModifiedIndex.cpp | 8 +- .../userlandfs/r5/src/test/ramfs/Locking.h | 2 +- .../userlandfs/r5/src/test/ramfs/Node.cpp | 18 +- .../userlandfs/r5/src/test/ramfs/Node.h | 6 +- .../userlandfs/r5/src/test/ramfs/Query.h | 5 +- .../r5/src/test/ramfs/SizeIndex.cpp | 8 +- .../userlandfs/r5/src/test/ramfs/Volume.cpp | 6 +- .../userlandfs/r5/src/test/ramfs/Volume.h | 9 +- .../r5/src/test/ramfs/kernel_interface.cpp | 3 +- .../userlandfs/ramfs/beos_interface/Jamfile | 4 +- .../file_systems/userlandfs/reiserfs/Jamfile | 6 +- 50 files changed, 203 insertions(+), 502 deletions(-) delete mode 100644 src/add-ons/kernel/file_systems/userlandfs/shared/Locker.cpp diff --git a/build/jam/HaikuImage b/build/jam/HaikuImage index 816d3c0769..c7b28672f1 100644 --- a/build/jam/HaikuImage +++ b/build/jam/HaikuImage @@ -139,7 +139,7 @@ BEOS_ADD_ONS_BUS_MANAGERS = pci $(X86_ONLY)ps2 $(X86_ONLY)isa ide scsi config_manager agp_gart usb firewire $(X86_ONLY)acpi ; BEOS_ADD_ONS_FILE_SYSTEMS = bfs cdda ext2 fat iso9660 nfs attribute_overlay - write_overlay ; + write_overlay $(GPL_ONLY)reiserfs ; #googlefs $(GPL_ONLY)ntfs ; diff --git a/headers/private/userlandfs/shared/Locker.h b/headers/private/userlandfs/shared/Locker.h index b04c2f7537..4b6fad512a 100644 --- a/headers/private/userlandfs/shared/Locker.h +++ b/headers/private/userlandfs/shared/Locker.h @@ -1,59 +1,33 @@ -// -// $Id: Locker.h,v 1.1 2002/07/09 12:24:33 ejakowatz Exp $ -// -// This is the Locker interface for OpenBeOS. It has been created to -// be source and binary compatible with the BeOS version of Locker. -// -// bonefish: -// * Removed `virtual' from destructor and FBC reserved space. -// * Renamed to Locker. +/* + * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Distributed under the terms of the MIT License. + */ +#ifndef _USERLAND_FS_LOCKER_H +#define _USERLAND_FS_LOCKER_H + +#ifdef _KERNEL_MODE + // kernel: use the RecursiveLock class -#ifndef _OPENBEOS_LOCKER_H -#define _OPENBEOS_LOCKER_H +#include "RecursiveLock.h" -#include -#include - namespace UserlandFSUtil { - -class Locker { -public: - Locker(); - Locker(const char *name); - Locker(bool benaphore_style); - Locker(const char *name, bool benaphore_style); - - // The following constructor is not documented in the BeBook - // and is only listed here to ensure binary compatibility. - // DO NOT USE THIS CONSTRUCTOR! - Locker(const char *name, bool benaphore_style, bool); - - ~Locker(); - - bool Lock(void); - status_t LockWithTimeout(bigtime_t timeout); - void Unlock(void); - - thread_id LockingThread(void) const; - bool IsLocked(void) const; - int32 CountLocks(void) const; - int32 CountLockRequests(void) const; - sem_id Sem(void) const; - -private: - void InitLocker(const char *name, bool benaphore_style); - bool AcquireLock(bigtime_t timeout, status_t *error); - - int32 fBenaphoreCount; - sem_id fSemaphoreID; - thread_id fLockOwner; - int32 fRecursiveCount; + typedef RecursiveLock Locker; }; -} // namespace UserlandFSUtil + +#else + // userland: use the BLocker class + +#include + +namespace UserlandFSUtil { + typedef BLocker Locker; +}; + +#endif // kernel/userland using UserlandFSUtil::Locker; -#endif // _OPENBEOS_LOCKER_H +#endif // _USERLAND_FS_LOCKER_H diff --git a/src/add-ons/kernel/file_systems/ramfs/Attribute.h b/src/add-ons/kernel/file_systems/ramfs/Attribute.h index e7bcd96ef0..e13b26a267 100644 --- a/src/add-ons/kernel/file_systems/ramfs/Attribute.h +++ b/src/add-ons/kernel/file_systems/ramfs/Attribute.h @@ -3,17 +3,19 @@ #ifndef ATTRIBUTE_H #define ATTRIBUTE_H +#include + #include "AttributeIndex.h" #include "AttributeIterator.h" #include "DataContainer.h" -#include "DLList.h" #include "String.h" class AllocationInfo; class Node; class Volume; -class Attribute : public DataContainer, public DLListLinkImpl { +class Attribute : public DataContainer, + public DoublyLinkedListLinkImpl { public: Attribute(Volume *volume, Node *node, const char *name, uint32 type = 0); ~Attribute(); @@ -44,7 +46,7 @@ public: // iterator management void AttachAttributeIterator(AttributeIterator *iterator); void DetachAttributeIterator(AttributeIterator *iterator); - inline DLList *GetAttributeIteratorList() + inline DoublyLinkedList *GetAttributeIteratorList() { return &fIterators; } // debugging @@ -58,7 +60,7 @@ private: bool fInIndex; // iterator management - DLList fIterators; + DoublyLinkedList fIterators; }; #endif // ATTRIBUTE_H diff --git a/src/add-ons/kernel/file_systems/ramfs/AttributeIndexImpl.cpp b/src/add-ons/kernel/file_systems/ramfs/AttributeIndexImpl.cpp index fc4e556a52..01844e7ce8 100644 --- a/src/add-ons/kernel/file_systems/ramfs/AttributeIndexImpl.cpp +++ b/src/add-ons/kernel/file_systems/ramfs/AttributeIndexImpl.cpp @@ -153,7 +153,7 @@ public: class AttributeIndexImpl::Iterator : public NodeEntryIterator< AttributeNodeIterator >, - public DLListLinkImpl, public EntryListener, + public DoublyLinkedListLinkImpl, public EntryListener, public NodeListener { public: Iterator(); @@ -182,7 +182,7 @@ private: // IteratorList -class AttributeIndexImpl::IteratorList : public DLList {}; +class AttributeIndexImpl::IteratorList : public DoublyLinkedList {}; // AttributeIndexImpl @@ -203,7 +203,7 @@ AttributeIndexImpl::~AttributeIndexImpl() { if (fIterators) { // unset the iterators - for (Iterator *iterator = fIterators->GetFirst(); + for (Iterator *iterator = fIterators->First(); iterator; iterator = fIterators->GetNext(iterator)) { iterator->SetTo(NULL, NULL, 0); @@ -243,7 +243,7 @@ AttributeIndexImpl::Changed(Attribute *attribute, const uint8 *oldKey, if (foundAttribute && *foundAttribute == attribute) { Node *node = attribute->GetNode(); // update the iterators - for (Iterator *iterator = fIterators->GetFirst(); + for (Iterator *iterator = fIterators->First(); iterator; iterator = fIterators->GetNext(iterator)) { if (iterator->GetCurrentNode() == node) diff --git a/src/add-ons/kernel/file_systems/ramfs/AttributeIterator.h b/src/add-ons/kernel/file_systems/ramfs/AttributeIterator.h index bb660afcbb..98fa30f607 100644 --- a/src/add-ons/kernel/file_systems/ramfs/AttributeIterator.h +++ b/src/add-ons/kernel/file_systems/ramfs/AttributeIterator.h @@ -5,12 +5,13 @@ #include -#include "DLList.h" +#include + class Attribute; class Node; -class AttributeIterator : public DLListLinkImpl { +class AttributeIterator : public DoublyLinkedListLinkImpl { public: AttributeIterator(Node *node = NULL); ~AttributeIterator(); diff --git a/src/add-ons/kernel/file_systems/ramfs/BlockAllocator.cpp b/src/add-ons/kernel/file_systems/ramfs/BlockAllocator.cpp index 652c886395..d7b015a5d4 100644 --- a/src/add-ons/kernel/file_systems/ramfs/BlockAllocator.cpp +++ b/src/add-ons/kernel/file_systems/ramfs/BlockAllocator.cpp @@ -8,7 +8,7 @@ #include "BlockAllocatorArea.h" #include "BlockAllocatorAreaBucket.h" #include "Debug.h" -#include "DLList.h" + // BlockAllocator diff --git a/src/add-ons/kernel/file_systems/ramfs/BlockAllocatorArea.h b/src/add-ons/kernel/file_systems/ramfs/BlockAllocatorArea.h index b7e1b55530..3e9d8e04c7 100644 --- a/src/add-ons/kernel/file_systems/ramfs/BlockAllocatorArea.h +++ b/src/add-ons/kernel/file_systems/ramfs/BlockAllocatorArea.h @@ -3,11 +3,13 @@ #ifndef BLOCK_ALLOCATOR_AREA_H #define BLOCK_ALLOCATOR_AREA_H +#include + #include "BlockAllocator.h" #include "BlockAllocatorMisc.h" -#include "DLList.h" -class BlockAllocator::Area : public DLListLinkImpl { + +class BlockAllocator::Area : public DoublyLinkedListLinkImpl { public: static Area *Create(size_t size); void Delete(); diff --git a/src/add-ons/kernel/file_systems/ramfs/BlockAllocatorAreaBucket.cpp b/src/add-ons/kernel/file_systems/ramfs/BlockAllocatorAreaBucket.cpp index 9f325f4c9d..2fd04f7879 100644 --- a/src/add-ons/kernel/file_systems/ramfs/BlockAllocatorAreaBucket.cpp +++ b/src/add-ons/kernel/file_systems/ramfs/BlockAllocatorAreaBucket.cpp @@ -14,7 +14,7 @@ BlockAllocator::AreaBucket::AreaBucket() // destructor BlockAllocator::AreaBucket::~AreaBucket() { - while (Area *area = fAreas.GetFirst()) { + while (Area *area = fAreas.First()) { RemoveArea(area); area->Delete(); } diff --git a/src/add-ons/kernel/file_systems/ramfs/BlockAllocatorAreaBucket.h b/src/add-ons/kernel/file_systems/ramfs/BlockAllocatorAreaBucket.h index e687463a7b..e010505266 100644 --- a/src/add-ons/kernel/file_systems/ramfs/BlockAllocatorAreaBucket.h +++ b/src/add-ons/kernel/file_systems/ramfs/BlockAllocatorAreaBucket.h @@ -3,10 +3,12 @@ #ifndef BLOCK_ALLOCATOR_AREA_BUCKET_H #define BLOCK_ALLOCATOR_AREA_BUCKET_H +#include + #include "BlockAllocator.h" #include "BlockAllocatorArea.h" #include "Debug.h" -#include "DLList.h" + class BlockAllocator::AreaBucket { public: @@ -23,8 +25,8 @@ public: inline void AddArea(Area *area); inline void RemoveArea(Area *area); - inline Area *GetFirstArea() const { return fAreas.GetFirst(); } - inline Area *GetLastArea() const { return fAreas.GetLast(); } + inline Area *GetFirstArea() const { return fAreas.First(); } + inline Area *GetLastArea() const { return fAreas.Last(); } inline Area *GetNextArea(Area* area) const; inline bool IsEmpty() const { return fAreas.IsEmpty(); } @@ -33,7 +35,7 @@ public: bool SanityCheck(bool deep = false) const; private: - DLList fAreas; + DoublyLinkedList fAreas; int32 fIndex; size_t fMinSize; size_t fMaxSize; diff --git a/src/add-ons/kernel/file_systems/ramfs/Directory.cpp b/src/add-ons/kernel/file_systems/ramfs/Directory.cpp index 1d62a84539..e5c0b68feb 100644 --- a/src/add-ons/kernel/file_systems/ramfs/Directory.cpp +++ b/src/add-ons/kernel/file_systems/ramfs/Directory.cpp @@ -20,7 +20,7 @@ Directory::Directory(Volume *volume) Directory::~Directory() { // delete all entries - while (Entry *entry = fEntries.GetFirst()) { + while (Entry *entry = fEntries.First()) { if (DeleteEntry(entry) != B_OK) { FATAL(("Could not delete all entries in directory.\n")); break; @@ -41,7 +41,7 @@ Directory::Link(Entry *entry) status_t Directory::Unlink(Entry *entry) { - if (entry == fReferrers.GetFirst()) + if (entry == fReferrers.First()) return Node::Unlink(entry); return B_BAD_VALUE; } @@ -64,7 +64,7 @@ Directory::GetSize() const Directory * Directory::GetParent() const { - Entry *entry = fReferrers.GetFirst(); + Entry *entry = fReferrers.First(); return (entry ? entry->GetParent() : NULL); } @@ -190,8 +190,9 @@ Directory::RemoveEntry(Entry *entry) if (GetVolume()->IteratorLock()) { // set the iterators' current entry Entry *nextEntry = fEntries.GetNext(entry); - DLList *iterators = entry->GetEntryIteratorList(); - for (EntryIterator *iterator = iterators->GetFirst(); + DoublyLinkedList *iterators + = entry->GetEntryIteratorList(); + for (EntryIterator *iterator = iterators->First(); iterator; iterator = iterators->GetNext(iterator)) { iterator->SetCurrent(nextEntry, true); @@ -199,7 +200,7 @@ Directory::RemoveEntry(Entry *entry) // Move the iterators from one list to the other, or just remove // them, if there is no next entry. if (nextEntry) { - DLList *nextIterators + DoublyLinkedList *nextIterators = nextEntry->GetEntryIteratorList(); nextIterators->MoveFrom(iterators); } else @@ -292,7 +293,7 @@ Directory::GetPreviousEntry(Entry **entry) const status_t error = (entry ? B_OK : B_BAD_VALUE); if (error == B_OK) { if (!*entry) - *entry = fEntries.GetLast(); + *entry = fEntries.Last(); else if ((*entry)->GetParent() == this) *entry = fEntries.GetPrevious(*entry); else @@ -310,7 +311,7 @@ Directory::GetNextEntry(Entry **entry) const status_t error = (entry ? B_OK : B_BAD_VALUE); if (error == B_OK) { if (!*entry) - *entry = fEntries.GetFirst(); + *entry = fEntries.First(); else if ((*entry)->GetParent() == this) *entry = fEntries.GetNext(*entry); else diff --git a/src/add-ons/kernel/file_systems/ramfs/Directory.h b/src/add-ons/kernel/file_systems/ramfs/Directory.h index 09b5cf8636..a626cbffce 100644 --- a/src/add-ons/kernel/file_systems/ramfs/Directory.h +++ b/src/add-ons/kernel/file_systems/ramfs/Directory.h @@ -3,9 +3,11 @@ #ifndef DIRECTORY_H #define DIRECTORY_H -#include "DLList.h" +#include + #include "Node.h" + class Entry; class File; class SymLink; @@ -50,7 +52,7 @@ private: status_t _CreateCommon(Node *node, const char *name); private: - DLList fEntries; + DoublyLinkedList fEntries; }; #endif // DIRECTORY_H diff --git a/src/add-ons/kernel/file_systems/ramfs/Entry.h b/src/add-ons/kernel/file_systems/ramfs/Entry.h index c5cfd8785f..1396d235de 100644 --- a/src/add-ons/kernel/file_systems/ramfs/Entry.h +++ b/src/add-ons/kernel/file_systems/ramfs/Entry.h @@ -6,7 +6,8 @@ #include #include -#include "DLList.h" +#include + #include "String.h" class AllocationInfo; @@ -14,7 +15,7 @@ class Directory; class EntryIterator; class Node; -class Entry : public DLListLinkImpl { +class Entry : public DoublyLinkedListLinkImpl { public: Entry(const char *name, Node *node = NULL, Directory *parent = NULL); ~Entry(); @@ -33,13 +34,14 @@ public: inline const char *GetName() const { return fName.GetString(); } // inline Volume *GetVolume() const { return fVolume; } - - inline DLListLink *GetReferrerLink() { return &fReferrerLink; } + + inline DoublyLinkedListLink *GetReferrerLink() + { return &fReferrerLink; } // entry iterator management void AttachEntryIterator(EntryIterator *iterator); void DetachEntryIterator(EntryIterator *iterator); - inline DLList *GetEntryIteratorList() + inline DoublyLinkedList *GetEntryIteratorList() { return &fIterators; } // debugging @@ -49,15 +51,15 @@ private: Directory *fParent; Node *fNode; String fName; - DLListLink fReferrerLink; + DoublyLinkedListLink fReferrerLink; // iterator management - DLList fIterators; + DoublyLinkedList fIterators; }; // GetNodeReferrerLink class GetNodeReferrerLink { private: - typedef DLListLink Link; + typedef DoublyLinkedListLink Link; public: inline Link *operator()(Entry *entry) const diff --git a/src/add-ons/kernel/file_systems/ramfs/EntryIterator.h b/src/add-ons/kernel/file_systems/ramfs/EntryIterator.h index 05ffbf8851..c11d446f64 100644 --- a/src/add-ons/kernel/file_systems/ramfs/EntryIterator.h +++ b/src/add-ons/kernel/file_systems/ramfs/EntryIterator.h @@ -5,12 +5,12 @@ #include -#include "DLList.h" +#include class Directory; class Entry; -class EntryIterator : public DLListLinkImpl { +class EntryIterator : public DoublyLinkedListLinkImpl { public: EntryIterator(Directory *directory = NULL); ~EntryIterator(); diff --git a/src/add-ons/kernel/file_systems/ramfs/Jamfile b/src/add-ons/kernel/file_systems/ramfs/Jamfile index a31835337f..9dc1ba8fa3 100644 --- a/src/add-ons/kernel/file_systems/ramfs/Jamfile +++ b/src/add-ons/kernel/file_systems/ramfs/Jamfile @@ -4,7 +4,7 @@ local userlandFSTop = [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems userlandfs ] ; local userlandFSIncludes = [ PrivateHeaders userlandfs ] ; -UsePrivateHeaders kernel ; # for +UsePrivateHeaders kernel shared ; SubDirHdrs [ FDirName $(userlandFSIncludes) shared ] ; @@ -14,7 +14,6 @@ DEFINES += DEBUG_APP="\\\"ramfs\\\"" ; KernelAddon ramfs : Debug.cpp - Locker.cpp String.cpp AllocationInfo.cpp diff --git a/src/add-ons/kernel/file_systems/ramfs/LastModifiedIndex.cpp b/src/add-ons/kernel/file_systems/ramfs/LastModifiedIndex.cpp index fb07734a31..21cd0b4d08 100644 --- a/src/add-ons/kernel/file_systems/ramfs/LastModifiedIndex.cpp +++ b/src/add-ons/kernel/file_systems/ramfs/LastModifiedIndex.cpp @@ -66,13 +66,13 @@ class LastModifiedIndex::NodeTree : public _NodeTree {}; // IteratorList -class LastModifiedIndex::IteratorList : public DLList {}; +class LastModifiedIndex::IteratorList : public DoublyLinkedList {}; // Iterator class LastModifiedIndex::Iterator : public NodeEntryIterator, - public DLListLinkImpl, public EntryListener, + public DoublyLinkedListLinkImpl, public EntryListener, public NodeListener { public: Iterator(); @@ -122,7 +122,7 @@ LastModifiedIndex::~LastModifiedIndex() fVolume->RemoveNodeListener(this, NULL); if (fIterators) { // unset the iterators - for (Iterator *iterator = fIterators->GetFirst(); + for (Iterator *iterator = fIterators->First(); iterator; iterator = fIterators->GetNext(iterator)) { iterator->SetTo(NULL, 0); @@ -151,7 +151,7 @@ LastModifiedIndex::Changed(Node *node, time_t oldModified) oldModified), node, &it); if (foundNode && *foundNode == node) { // update the iterators - for (Iterator *iterator = fIterators->GetFirst(); + for (Iterator *iterator = fIterators->First(); iterator; iterator = fIterators->GetNext(iterator)) { if (iterator->GetCurrentNode() == node) diff --git a/src/add-ons/kernel/file_systems/ramfs/Node.cpp b/src/add-ons/kernel/file_systems/ramfs/Node.cpp index 72715595e2..72aba18202 100644 --- a/src/add-ons/kernel/file_systems/ramfs/Node.cpp +++ b/src/add-ons/kernel/file_systems/ramfs/Node.cpp @@ -64,7 +64,7 @@ Node::Node(Volume *volume, uint8 type) Node::~Node() { // delete all attributes - while (Attribute *attribute = fAttributes.GetFirst()) { + while (Attribute *attribute = fAttributes.First()) { status_t error = DeleteAttribute(attribute); if (error != B_OK) { FATAL(("Node::~Node(): Failed to delete attribute!\n")); @@ -96,7 +96,7 @@ Node::AddReference() return B_OK; } - + // RemoveReference void Node::RemoveReference() @@ -234,9 +234,9 @@ Node::RemoveAttribute(Attribute *attribute) if (GetVolume()->IteratorLock()) { // set the iterators' current entry Attribute *nextAttr = fAttributes.GetNext(attribute); - DLList *iterators + DoublyLinkedList *iterators = attribute->GetAttributeIteratorList(); - for (AttributeIterator *iterator = iterators->GetFirst(); + for (AttributeIterator *iterator = iterators->First(); iterator; iterator = iterators->GetNext(iterator)) { iterator->SetCurrent(nextAttr, true); @@ -244,7 +244,7 @@ Node::RemoveAttribute(Attribute *attribute) // Move the iterators from one list to the other, or just remove // them, if there is no next attribute. if (nextAttr) { - DLList *nextIterators + DoublyLinkedList *nextIterators = nextAttr->GetAttributeIteratorList(); nextIterators->MoveFrom(iterators); } else @@ -293,7 +293,7 @@ Node::GetPreviousAttribute(Attribute **attribute) const status_t error = (attribute ? B_OK : B_BAD_VALUE); if (error == B_OK) { if (!*attribute) - *attribute = fAttributes.GetLast(); + *attribute = fAttributes.Last(); else if ((*attribute)->GetNode() == this) *attribute = fAttributes.GetPrevious(*attribute); else @@ -311,7 +311,7 @@ Node::GetNextAttribute(Attribute **attribute) const status_t error = (attribute ? B_OK : B_BAD_VALUE); if (error == B_OK) { if (!*attribute) - *attribute = fAttributes.GetFirst(); + *attribute = fAttributes.First(); else if ((*attribute)->GetNode() == this) *attribute = fAttributes.GetNext(*attribute); else @@ -326,14 +326,14 @@ Node::GetNextAttribute(Attribute **attribute) const Entry * Node::GetFirstReferrer() const { - return fReferrers.GetHead(); + return fReferrers.First(); } // GetLastReferrer Entry * Node::GetLastReferrer() const { - return fReferrers.GetTail(); + return fReferrers.Last(); } // GetPreviousReferrer diff --git a/src/add-ons/kernel/file_systems/ramfs/Node.h b/src/add-ons/kernel/file_systems/ramfs/Node.h index d5048b06e2..01e0c4d58b 100644 --- a/src/add-ons/kernel/file_systems/ramfs/Node.h +++ b/src/add-ons/kernel/file_systems/ramfs/Node.h @@ -29,7 +29,7 @@ enum { ACCESS_X = S_IXOTH, }; -class Node : public DLListLinkImpl { +class Node : public DoublyLinkedListLinkImpl { public: Node(Volume *volume, uint8 type); virtual ~Node(); @@ -121,11 +121,11 @@ private: bool fIsKnownToVFS; // attribute management - DLList fAttributes; + DoublyLinkedList fAttributes; protected: // entries referring to this node - DLList fReferrers; + DoublyLinkedList fReferrers; }; // MarkUnmodified diff --git a/src/add-ons/kernel/file_systems/ramfs/Query.h b/src/add-ons/kernel/file_systems/ramfs/Query.h index feadfa3c91..0fadfc4961 100644 --- a/src/add-ons/kernel/file_systems/ramfs/Query.h +++ b/src/add-ons/kernel/file_systems/ramfs/Query.h @@ -12,7 +12,8 @@ #include #include -#include "DLList.h" +#include + #include "Index.h" #include "Stack.h" #include "ramfs.h" @@ -93,7 +94,7 @@ class Expression { Term *fTerm; }; -class Query : public DLListLinkImpl { +class Query : public DoublyLinkedListLinkImpl { public: Query(Volume *volume, Expression *expression, uint32 flags); ~Query(); diff --git a/src/add-ons/kernel/file_systems/ramfs/SizeIndex.cpp b/src/add-ons/kernel/file_systems/ramfs/SizeIndex.cpp index d4ca3fe0a9..b0626ed8da 100644 --- a/src/add-ons/kernel/file_systems/ramfs/SizeIndex.cpp +++ b/src/add-ons/kernel/file_systems/ramfs/SizeIndex.cpp @@ -65,13 +65,13 @@ class SizeIndex::NodeTree : public _NodeTree {}; // IteratorList -class SizeIndex::IteratorList : public DLList {}; +class SizeIndex::IteratorList : public DoublyLinkedList {}; // Iterator class SizeIndex::Iterator : public NodeEntryIterator, - public DLListLinkImpl, public EntryListener, + public DoublyLinkedListLinkImpl, public EntryListener, public NodeListener { public: Iterator(); @@ -120,7 +120,7 @@ SizeIndex::~SizeIndex() fVolume->RemoveNodeListener(this, NULL); if (fIterators) { // unset the iterators - for (Iterator *iterator = fIterators->GetFirst(); + for (Iterator *iterator = fIterators->First(); iterator; iterator = fIterators->GetNext(iterator)) { iterator->SetTo(NULL, 0); @@ -149,7 +149,7 @@ SizeIndex::Changed(Node *node, off_t oldSize) node, &it); if (foundNode && *foundNode == node) { // update the iterators - for (Iterator *iterator = fIterators->GetFirst(); + for (Iterator *iterator = fIterators->First(); iterator; iterator = fIterators->GetNext(iterator)) { if (iterator->GetCurrentNode() == node) diff --git a/src/add-ons/kernel/file_systems/ramfs/Volume.cpp b/src/add-ons/kernel/file_systems/ramfs/Volume.cpp index d7cca09f8d..c02dc9d057 100644 --- a/src/add-ons/kernel/file_systems/ramfs/Volume.cpp +++ b/src/add-ons/kernel/file_systems/ramfs/Volume.cpp @@ -6,12 +6,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -774,7 +774,7 @@ Volume::UpdateLiveQueries(Entry *entry, Node* node, const char *attribute, { AutoLocker _(fQueryLocker); - for (Query* query = fQueries.GetFirst(); + for (Query* query = fQueries.First(); query; query = fQueries.GetNext(query)) { query->LiveUpdate(entry, node, attribute, type, oldKey, oldLength, diff --git a/src/add-ons/kernel/file_systems/ramfs/Volume.h b/src/add-ons/kernel/file_systems/ramfs/Volume.h index 9d72774226..bb7f781c63 100644 --- a/src/add-ons/kernel/file_systems/ramfs/Volume.h +++ b/src/add-ons/kernel/file_systems/ramfs/Volume.h @@ -6,12 +6,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -25,7 +25,8 @@ #include #include -#include "DLList.h" +#include + #include "Entry.h" #include "List.h" #include "Locker.h" @@ -176,7 +177,7 @@ public: void IteratorUnlock(); private: - typedef DLList QueryList; + typedef DoublyLinkedList QueryList; dev_t fID; ino_t fNextNodeID; diff --git a/src/add-ons/kernel/file_systems/ramfs/kernel_interface.cpp b/src/add-ons/kernel/file_systems/ramfs/kernel_interface.cpp index 2b59871eba..67cea12bd8 100644 --- a/src/add-ons/kernel/file_systems/ramfs/kernel_interface.cpp +++ b/src/add-ons/kernel/file_systems/ramfs/kernel_interface.cpp @@ -40,10 +40,11 @@ #include #include +#include + #include "AllocationInfo.h" #include "AttributeIndex.h" #include "AttributeIterator.h" -#include "AutoDeleter.h" #include "Debug.h" #include "Directory.h" #include "Entry.h" diff --git a/src/add-ons/kernel/file_systems/reiserfs/Jamfile b/src/add-ons/kernel/file_systems/reiserfs/Jamfile index 098e175689..bbbe3700a0 100644 --- a/src/add-ons/kernel/file_systems/reiserfs/Jamfile +++ b/src/add-ons/kernel/file_systems/reiserfs/Jamfile @@ -4,6 +4,7 @@ local userlandFSTop = [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems userlandfs ] ; local userlandFSIncludes = [ PrivateHeaders userlandfs ] ; +UsePrivateHeaders kernel ; SubDirHdrs [ FDirName $(userlandFSIncludes) shared ] ; SEARCH_SOURCE += [ FDirName $(userlandFSTop) shared ] ; @@ -11,9 +12,8 @@ SEARCH_SOURCE += [ FDirName $(userlandFSTop) shared ] ; DEFINES += DEBUG_APP="\\\"reiserfs\\\"" ; KernelAddon reiserfs - : + : Debug.cpp - Locker.cpp String.cpp Block.cpp @@ -26,7 +26,7 @@ KernelAddon reiserfs SuperBlock.cpp Tree.cpp VNode.cpp - Volume.cpp + Volume.cpp : $(HAIKU_LIBSUPC++) ; diff --git a/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/Jamfile b/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/Jamfile index 831b48fe43..fddf3f5d10 100644 --- a/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/Jamfile +++ b/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/Jamfile @@ -18,7 +18,6 @@ KernelAddon userlandfs : AreaSupport.cpp Debug.cpp LazyInitializable.cpp - Locker.cpp ObjectTracker.cpp Port.cpp Request.cpp diff --git a/src/add-ons/kernel/file_systems/userlandfs/server/Jamfile b/src/add-ons/kernel/file_systems/userlandfs/server/Jamfile index d319012bac..1b26ae1a83 100644 --- a/src/add-ons/kernel/file_systems/userlandfs/server/Jamfile +++ b/src/add-ons/kernel/file_systems/userlandfs/server/Jamfile @@ -22,7 +22,6 @@ Application userlandfs_server Debug.cpp driver_settings.c LazyInitializable.cpp - Locker.cpp ObjectTracker.cpp Port.cpp Request.cpp diff --git a/src/add-ons/kernel/file_systems/userlandfs/server/haiku/Jamfile b/src/add-ons/kernel/file_systems/userlandfs/server/haiku/Jamfile index 12f4989176..78b4ac9f07 100644 --- a/src/add-ons/kernel/file_systems/userlandfs/server/haiku/Jamfile +++ b/src/add-ons/kernel/file_systems/userlandfs/server/haiku/Jamfile @@ -35,4 +35,5 @@ SharedLibrary libuserlandfs_haiku_kernel.so : userlandfs_server + be # for BLocker only ; diff --git a/src/add-ons/kernel/file_systems/userlandfs/shared/Locker.cpp b/src/add-ons/kernel/file_systems/userlandfs/shared/Locker.cpp deleted file mode 100644 index 16de04c9b4..0000000000 --- a/src/add-ons/kernel/file_systems/userlandfs/shared/Locker.cpp +++ /dev/null @@ -1,303 +0,0 @@ -// -// $Id: Locker.cpp,v 1.1 2002/07/09 12:24:49 ejakowatz Exp $ -// -// This file contains the OpenBeOS implementation of Locker. -// - - -#include "Debug.h" -#include "Locker.h" -#include -#include - - -#ifdef USE_OPENBEOS_NAMESPACE -namespace OpenBeOS { -#endif - - -// -// Data Member Documentation: -// -// The "fBenaphoreCount" member is set to 1 if the Locker style is -// semaphore. If the style is benaphore, it is initialized to 0 and -// is incremented atomically when it is acquired, decremented when it -// is released. By setting the benaphore count to 1 when the style is -// semaphore, the benaphore effectively becomes a semaphore. I was able -// to determine this is what Be's implementation does by testing the -// result of the CountLockRequests() member. -// -// The "fSemaphoreID" member holds the sem_id returned from create_sem() -// when the Locker is constructed. It is used to acquire and release -// the lock regardless of the lock style (semaphore or benaphore). -// -// The "fLockOwner" member holds the thread_id of the thread which -// currently holds the lock. If no thread holds the lock, it is set to -// B_ERROR. -// -// The "fRecursiveCount" member holds a count of the number of times the -// thread holding the lock has acquired the lock without a matching unlock. -// It is basically the number of times the thread must call Unlock() before -// the lock can be acquired by a different thread. -// - - -// -// Constructors: -// -// All constructors just pass their arguments to InitLocker(). Note that -// the default for "name" is "some Locker" and "benaphore_style" is true. -// - -Locker::Locker() -{ - InitLocker("some Locker", true); -} - - -Locker::Locker(const char *name) -{ - InitLocker(name, true); -} - - -Locker::Locker(bool benaphore_style) -{ - InitLocker("some Locker", benaphore_style); -} - - -Locker::Locker(const char *name, - bool benaphore_style) -{ - InitLocker(name, benaphore_style); -} - - -// -// This constructor is not documented. The final argument is ignored for -// now. In Be's headers, its called "for_IPC". DO NOT USE THIS -// CONSTRUCTOR! -// -Locker::Locker(const char *name, - bool benaphore_style, - bool) -{ - InitLocker(name, benaphore_style); -} - - -// -// The destructor just deletes the semaphore. By deleting the semaphore, -// any threads waiting to acquire the Locker will be unblocked. -// -Locker::~Locker() -{ - delete_sem(fSemaphoreID); -} - - -bool -Locker::Lock(void) -{ - status_t result; - - return (AcquireLock(B_INFINITE_TIMEOUT, &result)); -} - - -status_t -Locker::LockWithTimeout(bigtime_t timeout) -{ - status_t result; - - AcquireLock(timeout, &result); - return result; -} - - - -void -Locker::Unlock(void) -{ - // If the thread currently holds the lockdecrement - if (IsLocked()) { - - // Decrement the number of outstanding locks this thread holds - // on this Locker. - fRecursiveCount--; - - // If the recursive count is now at 0, that means the Locker has - // been released by the thread. - if (fRecursiveCount == 0) { - - // The Locker is no longer owned by any thread. - fLockOwner = B_ERROR; - - // Decrement the benaphore count and store the undecremented - // value in oldBenaphoreCount. - int32 oldBenaphoreCount = atomic_add(&fBenaphoreCount, -1); - - // If the oldBenaphoreCount is greater than 1, then there is - // at lease one thread waiting for the lock in the case of a - // benaphore. - if (oldBenaphoreCount > 1) { - - // Since there are threads waiting for the lock, it must - // be released. Note, the old benaphore count will always be - // greater than 1 for a semaphore so the release is always done. - release_sem(fSemaphoreID); - } - } - } -} - - -thread_id -Locker::LockingThread(void) const -{ - return fLockOwner; -} - - -bool -Locker::IsLocked(void) const -{ - // This member returns true if the calling thread holds the lock. - // The easiest way to determine this is to compare the result of - // find_thread() to the fLockOwner. - return (find_thread(NULL) == fLockOwner); -} - - -int32 -Locker::CountLocks(void) const -{ - return fRecursiveCount; -} - - -int32 -Locker::CountLockRequests(void) const -{ - return fBenaphoreCount; -} - - -sem_id -Locker::Sem(void) const -{ - return fSemaphoreID; -} - - -void -Locker::InitLocker(const char *name, - bool benaphore) -{ - if (benaphore) { - // Because this is a benaphore, initialize the benaphore count and - // create the semaphore. Because this is a benaphore, the semaphore - // count starts at 0 (ie acquired). - fBenaphoreCount = 0; - fSemaphoreID = create_sem(0, name); - } else { - // Because this is a semaphore, initialize the benaphore count to -1 - // and create the semaphore. Because this is semaphore style, the - // semaphore count starts at 1 so that one thread can acquire it and - // the next thread to acquire it will block. - fBenaphoreCount = 1; - fSemaphoreID = create_sem(1, name); - } - -// bonefish: make kernel safe -#if !USER - set_sem_owner(fSemaphoreID, B_SYSTEM_TEAM); -#endif - - // The lock is currently not acquired so there is no owner. - fLockOwner = B_ERROR; - - // The lock is currently not acquired so the recursive count is zero. - fRecursiveCount = 0; -} - - -bool -Locker::AcquireLock(bigtime_t timeout, - status_t *error) -{ - // By default, return no error. - *error = B_NO_ERROR; - - // Only try to acquire the lock if the thread doesn't already own it. - if (!IsLocked()) { - - // Increment the benaphore count and test to see if it was already greater - // than 0. If it is greater than 0, then some thread already has the - // benaphore or the style is a semaphore. Either way, we need to acquire - // the semaphore in this case. - int32 oldBenaphoreCount = atomic_add(&fBenaphoreCount, 1); - if (oldBenaphoreCount > 0) { - - *error = acquire_sem_etc(fSemaphoreID, 1, B_RELATIVE_TIMEOUT, - timeout); - // Note, if the lock here does time out, the benaphore count - // is not decremented. By doing this, the benaphore count will - // never go back to zero. This means that the locking essentially - // changes to semaphore style if this was a benaphore. - // - // Doing the decrement of the benaphore count when the acquisition - // fails is a risky thing to do. If you decrement the counter at - // the same time the thread which holds the benaphore does an - // Unlock(), there is serious risk of a race condition. - // - // If the Unlock() sees a positive count and releases the semaphore - // and then the timed out thread decrements the count to 0, there - // is no one to take the semaphore. The next two threads will be - // able to acquire the benaphore at the same time! The first will - // increment the counter and acquire the lock. The second will - // acquire the semaphore and therefore the lock. Not good. - // - // This has been discussed on the becodetalk mailing list and - // Trey from Be had this to say: - // - // I looked at the LockWithTimeout() code, and it does not have - // _this_ (ie the race condition) problem. It circumvents it by - // NOT doing the atomic_add(&count, -1) if the semaphore - // acquisition fails. This means that if a - // Locker::LockWithTimeout() times out, all other Lock*() attempts - // turn into guaranteed semaphore grabs, _with_ the overhead of a - // (now) useless atomic_add(). - // - // Given Trey's comments, it looks like Be took the same approach - // I did. The output of CountLockRequests() of Be's implementation - // confirms Trey's comments also. - // - // Finally some thoughts for the future with this code: - // - If 2^31 timeouts occur on a 32-bit machine (ie today), - // the benaphore count will wrap to a negative number. This - // would have unknown consequences on the ability of the Locker - // to continue to function. - // - } - } - - // If the lock has successfully been acquired. - if (*error == B_NO_ERROR) { - - // Set the lock owner to this thread and increment the recursive count - // by one. The recursive count is incremented because one more Unlock() - // is now required to release the lock (ie, 0 => 1, 1 => 2 etc). - fLockOwner = find_thread(NULL); - fRecursiveCount++; - } - - // Return true if the lock has been acquired. - return (*error == B_NO_ERROR); -} - - -#ifdef USE_OPENBEOS_NAMESPACE -} -#endif diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Attribute.h b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Attribute.h index d383fe431c..e76bb75108 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Attribute.h +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Attribute.h @@ -3,17 +3,19 @@ #ifndef ATTRIBUTE_H #define ATTRIBUTE_H +#include + #include "AttributeIndex.h" #include "AttributeIterator.h" #include "DataContainer.h" -#include "DLList.h" #include "String.h" class AllocationInfo; class Node; class Volume; -class Attribute : public DataContainer, public DLListLinkImpl { +class Attribute : public DataContainer, + public DoublyLinkedListLinkImpl { public: Attribute(Volume *volume, Node *node, const char *name, uint32 type = 0); ~Attribute(); @@ -41,7 +43,7 @@ public: // iterator management void AttachAttributeIterator(AttributeIterator *iterator); void DetachAttributeIterator(AttributeIterator *iterator); - inline DLList *GetAttributeIteratorList() + inline DoublyLinkedList *GetAttributeIteratorList() { return &fIterators; } // debugging @@ -55,7 +57,7 @@ private: bool fInIndex; // iterator management - DLList fIterators; + DoublyLinkedList fIterators; }; #endif // ATTRIBUTE_H diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/AttributeIndexImpl.cpp b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/AttributeIndexImpl.cpp index a39ebb2d9f..6c98c7bc17 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/AttributeIndexImpl.cpp +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/AttributeIndexImpl.cpp @@ -157,7 +157,7 @@ public: class AttributeIndexImpl::Iterator : public NodeEntryIterator< AttributeNodeIterator >, - public DLListLinkImpl, public EntryListener, + public DoublyLinkedListLinkImpl, public EntryListener, public NodeListener { public: Iterator(); @@ -186,7 +186,7 @@ private: // IteratorList -class AttributeIndexImpl::IteratorList : public DLList {}; +class AttributeIndexImpl::IteratorList : public DoublyLinkedList {}; // AttributeIndexImpl @@ -207,7 +207,7 @@ AttributeIndexImpl::~AttributeIndexImpl() { if (fIterators) { // unset the iterators - for (Iterator *iterator = fIterators->GetFirst(); + for (Iterator *iterator = fIterators->First(); iterator; iterator = fIterators->GetNext(iterator)) { iterator->SetTo(NULL, NULL, 0); @@ -247,7 +247,7 @@ AttributeIndexImpl::Changed(Attribute *attribute, const uint8 *oldKey, if (foundAttribute && *foundAttribute == attribute) { Node *node = attribute->GetNode(); // update the iterators - for (Iterator *iterator = fIterators->GetFirst(); + for (Iterator *iterator = fIterators->First(); iterator; iterator = fIterators->GetNext(iterator)) { if (iterator->GetCurrentNode() == node) diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/AttributeIterator.h b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/AttributeIterator.h index bb660afcbb..98fa30f607 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/AttributeIterator.h +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/AttributeIterator.h @@ -5,12 +5,13 @@ #include -#include "DLList.h" +#include + class Attribute; class Node; -class AttributeIterator : public DLListLinkImpl { +class AttributeIterator : public DoublyLinkedListLinkImpl { public: AttributeIterator(Node *node = NULL); ~AttributeIterator(); diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/BlockAllocator.cpp b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/BlockAllocator.cpp index 652c886395..d7b015a5d4 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/BlockAllocator.cpp +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/BlockAllocator.cpp @@ -8,7 +8,7 @@ #include "BlockAllocatorArea.h" #include "BlockAllocatorAreaBucket.h" #include "Debug.h" -#include "DLList.h" + // BlockAllocator diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/BlockAllocatorArea.h b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/BlockAllocatorArea.h index b7e1b55530..3e9d8e04c7 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/BlockAllocatorArea.h +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/BlockAllocatorArea.h @@ -3,11 +3,13 @@ #ifndef BLOCK_ALLOCATOR_AREA_H #define BLOCK_ALLOCATOR_AREA_H +#include + #include "BlockAllocator.h" #include "BlockAllocatorMisc.h" -#include "DLList.h" -class BlockAllocator::Area : public DLListLinkImpl { + +class BlockAllocator::Area : public DoublyLinkedListLinkImpl { public: static Area *Create(size_t size); void Delete(); diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/BlockAllocatorAreaBucket.cpp b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/BlockAllocatorAreaBucket.cpp index 9f325f4c9d..2fd04f7879 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/BlockAllocatorAreaBucket.cpp +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/BlockAllocatorAreaBucket.cpp @@ -14,7 +14,7 @@ BlockAllocator::AreaBucket::AreaBucket() // destructor BlockAllocator::AreaBucket::~AreaBucket() { - while (Area *area = fAreas.GetFirst()) { + while (Area *area = fAreas.First()) { RemoveArea(area); area->Delete(); } diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/BlockAllocatorAreaBucket.h b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/BlockAllocatorAreaBucket.h index e687463a7b..e010505266 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/BlockAllocatorAreaBucket.h +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/BlockAllocatorAreaBucket.h @@ -3,10 +3,12 @@ #ifndef BLOCK_ALLOCATOR_AREA_BUCKET_H #define BLOCK_ALLOCATOR_AREA_BUCKET_H +#include + #include "BlockAllocator.h" #include "BlockAllocatorArea.h" #include "Debug.h" -#include "DLList.h" + class BlockAllocator::AreaBucket { public: @@ -23,8 +25,8 @@ public: inline void AddArea(Area *area); inline void RemoveArea(Area *area); - inline Area *GetFirstArea() const { return fAreas.GetFirst(); } - inline Area *GetLastArea() const { return fAreas.GetLast(); } + inline Area *GetFirstArea() const { return fAreas.First(); } + inline Area *GetLastArea() const { return fAreas.Last(); } inline Area *GetNextArea(Area* area) const; inline bool IsEmpty() const { return fAreas.IsEmpty(); } @@ -33,7 +35,7 @@ public: bool SanityCheck(bool deep = false) const; private: - DLList fAreas; + DoublyLinkedList fAreas; int32 fIndex; size_t fMinSize; size_t fMaxSize; diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Directory.cpp b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Directory.cpp index 39f5143ad8..e96fa094be 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Directory.cpp +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Directory.cpp @@ -20,7 +20,7 @@ Directory::Directory(Volume *volume) Directory::~Directory() { // delete all entries - while (Entry *entry = fEntries.GetFirst()) { + while (Entry *entry = fEntries.First()) { if (DeleteEntry(entry) != B_OK) { FATAL(("Could not delete all entries in directory.\n")); break; @@ -41,7 +41,7 @@ Directory::Link(Entry *entry) status_t Directory::Unlink(Entry *entry) { - if (entry == fReferrers.GetFirst()) + if (entry == fReferrers.First()) return Node::Unlink(entry); return B_BAD_VALUE; } @@ -64,7 +64,7 @@ Directory::GetSize() const Directory * Directory::GetParent() const { - Entry *entry = fReferrers.GetFirst(); + Entry *entry = fReferrers.First(); return (entry ? entry->GetParent() : NULL); } @@ -190,8 +190,9 @@ Directory::RemoveEntry(Entry *entry) if (GetVolume()->IteratorLock()) { // set the iterators' current entry Entry *nextEntry = fEntries.GetNext(entry); - DLList *iterators = entry->GetEntryIteratorList(); - for (EntryIterator *iterator = iterators->GetFirst(); + DoublyLinkedList *iterators + = entry->GetEntryIteratorList(); + for (EntryIterator *iterator = iterators->First(); iterator; iterator = iterators->GetNext(iterator)) { iterator->SetCurrent(nextEntry, true); @@ -199,7 +200,7 @@ Directory::RemoveEntry(Entry *entry) // Move the iterators from one list to the other, or just remove // them, if there is no next entry. if (nextEntry) { - DLList *nextIterators + DoublyLinkedList *nextIterators = nextEntry->GetEntryIteratorList(); nextIterators->MoveFrom(iterators); } else @@ -292,7 +293,7 @@ Directory::GetPreviousEntry(Entry **entry) const status_t error = (entry ? B_OK : B_BAD_VALUE); if (error == B_OK) { if (!*entry) - *entry = fEntries.GetLast(); + *entry = fEntries.Last(); else if ((*entry)->GetParent() == this) *entry = fEntries.GetPrevious(*entry); else @@ -310,7 +311,7 @@ Directory::GetNextEntry(Entry **entry) const status_t error = (entry ? B_OK : B_BAD_VALUE); if (error == B_OK) { if (!*entry) - *entry = fEntries.GetFirst(); + *entry = fEntries.First(); else if ((*entry)->GetParent() == this) *entry = fEntries.GetNext(*entry); else diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Directory.h b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Directory.h index 09b5cf8636..a626cbffce 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Directory.h +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Directory.h @@ -3,9 +3,11 @@ #ifndef DIRECTORY_H #define DIRECTORY_H -#include "DLList.h" +#include + #include "Node.h" + class Entry; class File; class SymLink; @@ -50,7 +52,7 @@ private: status_t _CreateCommon(Node *node, const char *name); private: - DLList fEntries; + DoublyLinkedList fEntries; }; #endif // DIRECTORY_H diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Entry.h b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Entry.h index 6dd5510489..da49318d9d 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Entry.h +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Entry.h @@ -5,16 +5,18 @@ #include -#include "DLList.h" +#include + #include "fsproto.h" #include "String.h" + class AllocationInfo; class Directory; class EntryIterator; class Node; -class Entry : public DLListLinkImpl { +class Entry : public DoublyLinkedListLinkImpl { public: Entry(const char *name, Node *node = NULL, Directory *parent = NULL); ~Entry(); @@ -33,13 +35,14 @@ public: inline const char *GetName() const { return fName.GetString(); } // inline Volume *GetVolume() const { return fVolume; } - - inline DLListLink *GetReferrerLink() { return &fReferrerLink; } + + inline DoublyLinkedListLink *GetReferrerLink() + { return &fReferrerLink; } // entry iterator management void AttachEntryIterator(EntryIterator *iterator); void DetachEntryIterator(EntryIterator *iterator); - inline DLList *GetEntryIteratorList() + inline DoublyLinkedList *GetEntryIteratorList() { return &fIterators; } // debugging @@ -49,15 +52,15 @@ private: Directory *fParent; Node *fNode; String fName; - DLListLink fReferrerLink; + DoublyLinkedListLink fReferrerLink; // iterator management - DLList fIterators; + DoublyLinkedList fIterators; }; // GetNodeReferrerLink class GetNodeReferrerLink { private: - typedef DLListLink Link; + typedef DoublyLinkedListLink Link; public: inline Link *operator()(Entry *entry) const diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/EntryIterator.h b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/EntryIterator.h index 05ffbf8851..c11d446f64 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/EntryIterator.h +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/EntryIterator.h @@ -5,12 +5,12 @@ #include -#include "DLList.h" +#include class Directory; class Entry; -class EntryIterator : public DLListLinkImpl { +class EntryIterator : public DoublyLinkedListLinkImpl { public: EntryIterator(Directory *directory = NULL); ~EntryIterator(); diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Jamfile b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Jamfile index 178fa4888a..34339335c8 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Jamfile +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Jamfile @@ -25,7 +25,6 @@ SEARCH_SOURCE += [ FDirName $(userlandFSTop) src shared ] ; Addon ramfs : Debug.cpp - Locker.cpp String.cpp AllocationInfo.cpp diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/LastModifiedIndex.cpp b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/LastModifiedIndex.cpp index 72152b37c1..8d59bb3996 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/LastModifiedIndex.cpp +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/LastModifiedIndex.cpp @@ -66,13 +66,13 @@ class LastModifiedIndex::NodeTree : public _NodeTree {}; // IteratorList -class LastModifiedIndex::IteratorList : public DLList {}; +class LastModifiedIndex::IteratorList : public DoublyLinkedList {}; // Iterator class LastModifiedIndex::Iterator : public NodeEntryIterator, - public DLListLinkImpl, public EntryListener, + public DoublyLinkedListLinkImpl, public EntryListener, public NodeListener { public: Iterator(); @@ -122,7 +122,7 @@ LastModifiedIndex::~LastModifiedIndex() fVolume->RemoveNodeListener(this, NULL); if (fIterators) { // unset the iterators - for (Iterator *iterator = fIterators->GetFirst(); + for (Iterator *iterator = fIterators->First(); iterator; iterator = fIterators->GetNext(iterator)) { iterator->SetTo(NULL, 0); @@ -151,7 +151,7 @@ LastModifiedIndex::Changed(Node *node, time_t oldModified) oldModified), node, &it); if (foundNode && *foundNode == node) { // update the iterators - for (Iterator *iterator = fIterators->GetFirst(); + for (Iterator *iterator = fIterators->First(); iterator; iterator = fIterators->GetNext(iterator)) { if (iterator->GetCurrentNode() == node) diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Locking.h b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Locking.h index 5831719a34..95713a530e 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Locking.h +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Locking.h @@ -3,7 +3,7 @@ #ifndef LOCKING_H #define LOCKING_H -#include "AutoLocker.h" +#include class Volume; diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Node.cpp b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Node.cpp index 33bd1dcdbd..2e359aa913 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Node.cpp +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Node.cpp @@ -64,7 +64,7 @@ Node::Node(Volume *volume, uint8 type) Node::~Node() { // delete all attributes - while (Attribute *attribute = fAttributes.GetFirst()) { + while (Attribute *attribute = fAttributes.First()) { status_t error = DeleteAttribute(attribute); if (error != B_OK) { FATAL(("Node::~Node(): Failed to delete attribute!\n")); @@ -96,7 +96,7 @@ Node::AddReference() return B_OK; } - + // RemoveReference void Node::RemoveReference() @@ -234,9 +234,9 @@ Node::RemoveAttribute(Attribute *attribute) if (GetVolume()->IteratorLock()) { // set the iterators' current entry Attribute *nextAttr = fAttributes.GetNext(attribute); - DLList *iterators + DoublyLinkedList *iterators = attribute->GetAttributeIteratorList(); - for (AttributeIterator *iterator = iterators->GetFirst(); + for (AttributeIterator *iterator = iterators->First(); iterator; iterator = iterators->GetNext(iterator)) { iterator->SetCurrent(nextAttr, true); @@ -244,7 +244,7 @@ Node::RemoveAttribute(Attribute *attribute) // Move the iterators from one list to the other, or just remove // them, if there is no next attribute. if (nextAttr) { - DLList *nextIterators + DoublyLinkedList *nextIterators = nextAttr->GetAttributeIteratorList(); nextIterators->MoveFrom(iterators); } else @@ -293,7 +293,7 @@ Node::GetPreviousAttribute(Attribute **attribute) const status_t error = (attribute ? B_OK : B_BAD_VALUE); if (error == B_OK) { if (!*attribute) - *attribute = fAttributes.GetLast(); + *attribute = fAttributes.Last(); else if ((*attribute)->GetNode() == this) *attribute = fAttributes.GetPrevious(*attribute); else @@ -311,7 +311,7 @@ Node::GetNextAttribute(Attribute **attribute) const status_t error = (attribute ? B_OK : B_BAD_VALUE); if (error == B_OK) { if (!*attribute) - *attribute = fAttributes.GetFirst(); + *attribute = fAttributes.First(); else if ((*attribute)->GetNode() == this) *attribute = fAttributes.GetNext(*attribute); else @@ -326,14 +326,14 @@ Node::GetNextAttribute(Attribute **attribute) const Entry * Node::GetFirstReferrer() const { - return fReferrers.GetHead(); + return fReferrers.First(); } // GetLastReferrer Entry * Node::GetLastReferrer() const { - return fReferrers.GetTail(); + return fReferrers.Last(); } // GetPreviousReferrer diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Node.h b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Node.h index 39528a49df..d9250b14de 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Node.h +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Node.h @@ -29,7 +29,7 @@ enum { ACCESS_X = S_IXOTH, }; -class Node : public DLListLinkImpl { +class Node : public DoublyLinkedListLinkImpl { public: Node(Volume *volume, uint8 type); virtual ~Node(); @@ -122,11 +122,11 @@ private: bool fIsKnownToVFS; // attribute management - DLList fAttributes; + DoublyLinkedList fAttributes; protected: // entries referring to this node - DLList fReferrers; + DoublyLinkedList fReferrers; }; // MarkUnmodified diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Query.h b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Query.h index 7d909d47f5..05f5eb0022 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Query.h +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Query.h @@ -12,7 +12,8 @@ #include #include -#include "DLList.h" +#include + #include "Index.h" #include "Stack.h" #include "ramfs.h" @@ -92,7 +93,7 @@ class Expression { Term *fTerm; }; -class Query : public DLListLinkImpl { +class Query : public DoublyLinkedListLinkImpl { public: Query(Volume *volume, Expression *expression, uint32 flags); ~Query(); diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/SizeIndex.cpp b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/SizeIndex.cpp index f59068a5ce..d802ddd137 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/SizeIndex.cpp +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/SizeIndex.cpp @@ -65,13 +65,13 @@ class SizeIndex::NodeTree : public _NodeTree {}; // IteratorList -class SizeIndex::IteratorList : public DLList {}; +class SizeIndex::IteratorList : public DoublyLinkedList {}; // Iterator class SizeIndex::Iterator : public NodeEntryIterator, - public DLListLinkImpl, public EntryListener, + public DoublyLinkedListLinkImpl, public EntryListener, public NodeListener { public: Iterator(); @@ -120,7 +120,7 @@ SizeIndex::~SizeIndex() fVolume->RemoveNodeListener(this, NULL); if (fIterators) { // unset the iterators - for (Iterator *iterator = fIterators->GetFirst(); + for (Iterator *iterator = fIterators->First(); iterator; iterator = fIterators->GetNext(iterator)) { iterator->SetTo(NULL, 0); @@ -149,7 +149,7 @@ SizeIndex::Changed(Node *node, off_t oldSize) node, &it); if (foundNode && *foundNode == node) { // update the iterators - for (Iterator *iterator = fIterators->GetFirst(); + for (Iterator *iterator = fIterators->First(); iterator; iterator = fIterators->GetNext(iterator)) { if (iterator->GetCurrentNode() == node) diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Volume.cpp b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Volume.cpp index 49741159a7..e0cf7c8d15 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Volume.cpp +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Volume.cpp @@ -6,12 +6,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -763,7 +763,7 @@ Volume::UpdateLiveQueries(Entry *entry, Node* node, const char *attribute, { AutoLocker _(fQueryLocker); - for (Query* query = fQueries.GetFirst(); + for (Query* query = fQueries.First(); query; query = fQueries.GetNext(query)) { query->LiveUpdate(entry, node, attribute, type, oldKey, oldLength, diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Volume.h b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Volume.h index b7c7f4005f..575fd861bb 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Volume.h +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/Volume.h @@ -6,12 +6,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -25,7 +25,8 @@ #include #include -#include "DLList.h" +#include + #include "Entry.h" #include "List.h" #include "Locker.h" @@ -173,7 +174,7 @@ public: void IteratorUnlock(); private: - typedef DLList QueryList; + typedef DoublyLinkedList QueryList; nspace_id fID; vnode_id fNextNodeID; diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/kernel_interface.cpp b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/kernel_interface.cpp index 8fe0d41144..331f578214 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/kernel_interface.cpp +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/ramfs/kernel_interface.cpp @@ -40,10 +40,11 @@ //#include "cache.h" #include "fsproto.h" +#include + #include "AllocationInfo.h" #include "AttributeIndex.h" #include "AttributeIterator.h" -#include "AutoDeleter.h" #include "Debug.h" #include "Directory.h" #include "Entry.h" diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/ramfs/beos_interface/Jamfile b/src/tests/add-ons/kernel/file_systems/userlandfs/ramfs/beos_interface/Jamfile index c03c4aabde..fffb4d9f68 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/ramfs/beos_interface/Jamfile +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/ramfs/beos_interface/Jamfile @@ -7,6 +7,8 @@ local userlandFSIncludes = [ PrivateHeaders userlandfs ] ; local ramFSTop = [ FDirName $(HAIKU_TOP) src tests add-ons kernel file_systems userlandfs r5 src test ramfs ] ; +UsePrivateHeaders kernel shared ; + DEFINES += USER=1 ; # avoid inclusion of @@ -25,7 +27,6 @@ SEARCH_SOURCE += [ FDirName $(userlandFSTop) shared ] ; Addon ramfs : Debug.cpp - Locker.cpp String.cpp AllocationInfo.cpp @@ -57,4 +58,5 @@ Addon ramfs SymLink.cpp Volume.cpp : libuserlandfs_beos_kernel.so + be # for BLocker only ; diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/reiserfs/Jamfile b/src/tests/add-ons/kernel/file_systems/userlandfs/reiserfs/Jamfile index 5efa363be6..59da2d5b28 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/reiserfs/Jamfile +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/reiserfs/Jamfile @@ -14,9 +14,8 @@ SEARCH_SOURCE += $(reiserFSTop) ; SEARCH_SOURCE += [ FDirName $(userlandFSTop) shared ] ; Addon reiserfs - : + : Debug.cpp - Locker.cpp String.cpp Block.cpp @@ -29,9 +28,10 @@ Addon reiserfs SuperBlock.cpp Tree.cpp VNode.cpp - Volume.cpp + Volume.cpp : libuserlandfs_haiku_kernel.so + be # for BLocker only ; HaikuSubInclude beos_interface ;