haiku/headers/private/kernel/file_cache.h
Axel Dörfler 4b0c008cc5 Added some definitions for the generic syscalls. Cache modules should currently
be located in the "file_cache" directory - this might or might be changed later.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-07 00:56:50 +00:00

45 lines
1.1 KiB
C

/*
* Copyright 2004, Axel Dörfler, axeld@pinc-software.de.
* Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_FILE_CACHE_H
#define _KERNEL_FILE_CACHE_H
#include <vfs.h>
#include <vm_types.h>
#include <module.h>
// temporary/optional cache syscall API
#define CACHE_SYSCALLS "cache"
#define CACHE_CLEAR 1 // takes no parameters
#define CACHE_SET_MODULE 2 // gets the module name as parameter
#define CACHE_MODULES_NAME "file_cache"
struct cache_module_info {
module_info info;
void (*node_opened)(mount_id mountID, vnode_id vnodeID, off_t size);
void (*node_closed)(mount_id mountID, vnode_id vnodeID);
};
#ifdef __cplusplus
extern "C" {
#endif
extern void cache_node_opened(vm_cache_ref *cache, mount_id mountID, vnode_id vnodeID);
extern void cache_node_closed(vm_cache_ref *cache, mount_id mountID, vnode_id vnodeID);
extern void cache_prefetch(mount_id mountID, vnode_id vnodeID);
extern status_t file_cache_init(void);
extern vm_store *vm_create_vnode_store(void *vnode);
#ifdef __cplusplus
}
#endif
#endif /* _KRENEL_FILE_CACHE_H */