Switched to new DoublyLinkedList class.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11189 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2cfdb0ed38
commit
be6294af4b
9
src/kernel/core/cache/block_cache.cpp
vendored
9
src/kernel/core/cache/block_cache.cpp
vendored
@ -38,7 +38,8 @@
|
||||
#define DEBUG_CHANGED
|
||||
|
||||
struct cache_transaction;
|
||||
typedef DoublyLinked::Link block_link;
|
||||
struct cached_block;
|
||||
typedef DoublyLinkedListLink<cached_block> block_link;
|
||||
|
||||
struct cached_block {
|
||||
cached_block *next; // next in hash
|
||||
@ -67,7 +68,9 @@ struct block_cache {
|
||||
hash_table *transaction_hash;
|
||||
};
|
||||
|
||||
typedef DoublyLinked::List<cached_block, &cached_block::previous_transaction_link> block_list;
|
||||
typedef DoublyLinkedList<cached_block,
|
||||
DoublyLinkedListMemberGetLink<cached_block,
|
||||
&cached_block::previous_transaction_link> > block_list;
|
||||
|
||||
struct cache_transaction {
|
||||
cache_transaction *next;
|
||||
@ -514,7 +517,7 @@ cache_sync_transaction(void *_cache, int32 id)
|
||||
|
||||
if (transaction->id <= id && !transaction->open) {
|
||||
while (transaction->num_blocks > 0) {
|
||||
status = write_cached_block(cache, block_list::GetItem(transaction->blocks.Head()), false);
|
||||
status = write_cached_block(cache, transaction->blocks.Head(), false);
|
||||
if (status != B_OK)
|
||||
return status;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <lock.h>
|
||||
|
||||
|
||||
class IORequest {
|
||||
class IORequest : public DoublyLinkedListLinkImpl<IORequest> {
|
||||
public:
|
||||
IORequest(void *cookie, off_t offset, void *buffer, size_t size, bool write = false);
|
||||
IORequest(void *cookie, off_t offset, const void *buffer, size_t size, bool write = true);
|
||||
@ -22,8 +22,6 @@ class IORequest {
|
||||
|
||||
size_t Size() const { return size; }
|
||||
|
||||
DoublyLinked::Link link;
|
||||
|
||||
void *cookie;
|
||||
addr_t physical_address;
|
||||
addr_t virtual_address;
|
||||
@ -54,7 +52,7 @@ class IOScheduler {
|
||||
pnp_devfs_driver_info *fDeviceHooks;
|
||||
mutex fLock;
|
||||
thread_id fThread;
|
||||
DoublyLinked::List<IORequest, &IORequest::link> fRequests;
|
||||
DoublyLinkedList<IORequest> fRequests;
|
||||
};
|
||||
|
||||
#endif /* IO_SCHEDULER_H */
|
||||
|
Loading…
Reference in New Issue
Block a user