* Renamed src/system/kernel/device_manager/io_requests.{h,cpp} to
IORequest.{h,cpp}. * Introduced public <io_requests.h> header. Currently it only declares the single function BFS uses. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29446 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
afe5aa6692
commit
aa4ba93e25
27
headers/os/drivers/io_requests.h
Normal file
27
headers/os/drivers/io_requests.h
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2009, Haiku Inc. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _IO_REQUESTS_H
|
||||
#define _IO_REQUESTS_H
|
||||
|
||||
/*! I/O request interface */
|
||||
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
typedef struct IORequest io_request;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
bool io_request_is_write(const io_request* request);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _IO_REQUESTS_H */
|
@ -12,7 +12,7 @@
|
||||
#include <scsi.h>
|
||||
|
||||
#include "dma_resources.h"
|
||||
#include "io_requests.h"
|
||||
#include "IORequest.h"
|
||||
#include "IOScheduler.h"
|
||||
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <scsi_periph.h>
|
||||
|
||||
#include "dma_resources.h"
|
||||
#include "io_requests.h"
|
||||
#include "IORequest.h"
|
||||
#include "IOScheduler.h"
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
// TODO: temporary solution as long as there is no public I/O requests API
|
||||
#ifndef BFS_SHELL
|
||||
# include "io_requests.h"
|
||||
# include <io_requests.h>
|
||||
#endif
|
||||
|
||||
#define BFS_IO_SIZE 65536
|
||||
@ -458,7 +458,7 @@ bfs_io(fs_volume* _volume, fs_vnode* _node, void* _cookie, io_request* request)
|
||||
Inode* inode = (Inode*)_node->private_node;
|
||||
|
||||
#ifndef BFS_SHELL
|
||||
if (request->IsWrite() && volume->IsReadOnly())
|
||||
if (io_request_is_write(request) && volume->IsReadOnly())
|
||||
return B_READ_ONLY_DEVICE;
|
||||
#endif
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <scsi_periph.h>
|
||||
#include <device_manager.h>
|
||||
|
||||
#include "io_requests.h"
|
||||
#include "IORequest.h"
|
||||
#include "wrapper.h"
|
||||
|
||||
|
||||
|
2
src/system/kernel/cache/file_cache.cpp
vendored
2
src/system/kernel/cache/file_cache.cpp
vendored
@ -25,7 +25,7 @@
|
||||
#include <vm_page.h>
|
||||
#include <vm_cache.h>
|
||||
|
||||
#include "io_requests.h"
|
||||
#include "IORequest.h"
|
||||
|
||||
|
||||
//#define TRACE_FILE_CACHE
|
||||
|
2
src/system/kernel/cache/vnode_store.cpp
vendored
2
src/system/kernel/cache/vnode_store.cpp
vendored
@ -13,7 +13,7 @@
|
||||
#include <vfs.h>
|
||||
#include <vm.h>
|
||||
|
||||
#include "io_requests.h"
|
||||
#include "IORequest.h"
|
||||
|
||||
|
||||
status_t
|
||||
|
1405
src/system/kernel/device_manager/IORequest.cpp
Normal file
1405
src/system/kernel/device_manager/IORequest.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -3,8 +3,8 @@
|
||||
* Copyright 2008, Axel Dörfler, axeld@pinc-software.de.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef IO_REQUESTS_H
|
||||
#define IO_REQUESTS_H
|
||||
#ifndef IO_REQUEST_H
|
||||
#define IO_REQUEST_H
|
||||
|
||||
#include <sys/uio.h>
|
||||
|
||||
@ -371,4 +371,4 @@ operator new[](size_t size, const vip_io_alloc_t& vip_io_alloc) throw ()
|
||||
}
|
||||
|
||||
|
||||
#endif // IO_REQUESTS_H
|
||||
#endif // IO_REQUEST_H
|
@ -14,7 +14,7 @@
|
||||
#include <util/OpenHashTable.h>
|
||||
|
||||
#include "dma_resources.h"
|
||||
#include "io_requests.h"
|
||||
#include "IORequest.h"
|
||||
|
||||
|
||||
class IOCallback {
|
||||
|
@ -16,6 +16,7 @@ KernelMergeObject kernel_device_manager.o :
|
||||
|
||||
dma_resources.cpp
|
||||
io_requests.cpp
|
||||
IORequest.cpp
|
||||
:
|
||||
$(TARGET_KERNEL_PIC_CCFLAGS)
|
||||
;
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <vm.h>
|
||||
|
||||
#include "BaseDevice.h"
|
||||
#include "io_requests.h"
|
||||
#include "IORequest.h"
|
||||
#include "legacy_drivers.h"
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "BaseDevice.h"
|
||||
#include "devfs_private.h"
|
||||
#include "id_generator.h"
|
||||
#include "io_requests.h"
|
||||
#include "IORequest.h"
|
||||
#include "io_resources.h"
|
||||
#include "IOScheduler.h"
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <kernel.h>
|
||||
#include <util/AutoLock.h>
|
||||
|
||||
#include "io_requests.h"
|
||||
#include "IORequest.h"
|
||||
|
||||
|
||||
//#define TRACE_DMA_RESOURCE
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -53,7 +53,7 @@
|
||||
#include <vm_cache.h>
|
||||
|
||||
#include "fifo.h"
|
||||
#include "io_requests.h"
|
||||
#include "IORequest.h"
|
||||
|
||||
|
||||
//#define TRACE_VFS
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <vm_page.h>
|
||||
#include <vm_priv.h>
|
||||
|
||||
#include "io_requests.h"
|
||||
#include "IORequest.h"
|
||||
|
||||
|
||||
#if ENABLE_SWAP_SUPPORT
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include <vm_priv.h>
|
||||
|
||||
#include "VMAnonymousCache.h"
|
||||
#include "io_requests.h"
|
||||
#include "IORequest.h"
|
||||
|
||||
|
||||
//#define TRACE_VM
|
||||
|
@ -32,8 +32,8 @@
|
||||
#include <vm_page.h>
|
||||
#include <vm_cache.h>
|
||||
|
||||
#include "IORequest.h"
|
||||
#include "PageCacheLocker.h"
|
||||
#include "io_requests.h"
|
||||
|
||||
|
||||
//#define TRACE_VM_PAGE
|
||||
|
Loading…
Reference in New Issue
Block a user