Added some more and better cache notifications.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11203 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2004, Axel Dörfler, [email protected].
|
* Copyright 2004-2005, Axel Dörfler, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef _KERNEL_FILE_CACHE_H
|
#ifndef _KERNEL_FILE_CACHE_H
|
||||||
@@ -19,19 +19,29 @@
|
|||||||
|
|
||||||
#define CACHE_MODULES_NAME "file_cache"
|
#define CACHE_MODULES_NAME "file_cache"
|
||||||
|
|
||||||
|
#define FILE_CACHE_SEQUENTIAL_ACCESS 0x01
|
||||||
|
#define FILE_CACHE_LOADED_COMPLETELY 0x02
|
||||||
|
#define FILE_CACHE_NO_IO 0x04
|
||||||
|
|
||||||
struct cache_module_info {
|
struct cache_module_info {
|
||||||
module_info info;
|
module_info info;
|
||||||
|
|
||||||
void (*node_opened)(mount_id mountID, vnode_id vnodeID, off_t size);
|
void (*node_opened)(void *vnode, int32 fdType, mount_id mountID, vnode_id parentID,
|
||||||
void (*node_closed)(mount_id mountID, vnode_id vnodeID);
|
vnode_id vnodeID, const char *name, off_t size);
|
||||||
|
void (*node_closed)(void *vnode, int32 fdType, mount_id mountID, vnode_id vnodeID,
|
||||||
|
int32 accessType);
|
||||||
|
void (*node_launched)(size_t argCount, char * const *args);
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void cache_node_opened(vm_cache_ref *cache, mount_id mountID, vnode_id vnodeID);
|
extern void cache_node_opened(void *vnode, int32 fdType, vm_cache_ref *cache,
|
||||||
extern void cache_node_closed(vm_cache_ref *cache, mount_id mountID, vnode_id vnodeID);
|
mount_id mountID, vnode_id parentID, vnode_id vnodeID, const char *name);
|
||||||
|
extern void cache_node_closed(void *vnode, int32 fdType, vm_cache_ref *cache,
|
||||||
|
mount_id mountID, vnode_id vnodeID);
|
||||||
|
extern void cache_node_launched(size_t argCount, char * const *args);
|
||||||
extern void cache_prefetch(mount_id mountID, vnode_id vnodeID);
|
extern void cache_prefetch(mount_id mountID, vnode_id vnodeID);
|
||||||
extern status_t file_cache_init(void);
|
extern status_t file_cache_init(void);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user