On 64 bit machines the bfs_inode::pad field is too small for a

DoublyLinkedListLink. That actually seems to get the bfs_shell working
properly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34257 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-11-25 21:24:45 +00:00
parent d1456cc2de
commit 3818aa7dac
2 changed files with 13 additions and 1 deletions

View File

@ -180,10 +180,17 @@ public:
{ ASSERT_WRITE_LOCKED_RW_LOCK(&fLock); }
#endif
#ifdef B_HAIKU_64_BIT
Link* GetDoublyLinkedListLink()
{ return &fListLink; }
const Link* GetDoublyLinkedListLink() const
{ return &fListLink; }
#else
Link* GetDoublyLinkedListLink()
{ return (Link*)&fNode.pad[0]; }
const Link* GetDoublyLinkedListLink() const
{ return (Link*)&fNode.pad[0]; }
#endif
private:
Inode(const Inode& other);
@ -241,6 +248,10 @@ private:
// we need those values to ensure we will remove
// the correct keys from the indices
#ifdef B_HAIKU_64_BIT
Link fListLink;
#endif
mutable recursive_lock fSmallDataLock;
SinglyLinkedList<AttributeIterator> fIterators;
};

View File

@ -202,7 +202,8 @@ struct bfs_inode {
};
bigtime_t status_change_time;
int32 pad[2];
// we use this member as a doubly linked list link
// on 32 bit architectures we use this member as a doubly linked list
// link
small_data small_data_start[0];