* Removed some unused headers.

* Removed unused pools implementation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17961 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-06-29 15:24:40 +00:00
parent 4e26bc08b8
commit 13e6b02018
5 changed files with 0 additions and 469 deletions
-50
View File
@@ -1,50 +0,0 @@
/*
Copyright 1999-2001, Be Incorporated. All Rights Reserved.
This file may be used under the terms of the Be Sample Code License.
*/
#ifndef _CACHE_H_
#define _CACHE_H_
#include <OS.h>
#define ALLOW_WRITES 1
#define NO_WRITES 0
#ifdef __cplusplus
extern "C" {
#endif
extern int init_block_cache(int max_blocks, int flags);
extern void shutdown_block_cache(void);
extern void force_cache_flush(int dev, int prefer_log_blocks);
extern int flush_blocks(int dev, off_t bnum, int nblocks);
extern int flush_device(int dev, int warn_locked);
extern int init_cache_for_device(int fd, off_t max_blocks);
extern int remove_cached_device_blocks(int dev, int allow_write);
extern void *get_block(int dev, off_t bnum, int bsize);
extern void *get_empty_block(int dev, off_t bnum, int bsize);
extern int release_block(int dev, off_t bnum);
extern int mark_blocks_dirty(int dev, off_t bnum, int nblocks);
extern int cached_read(int dev, off_t bnum, void *data, off_t num_blocks, int bsize);
extern int cached_write(int dev, off_t bnum, const void *data,
off_t num_blocks, int bsize);
extern int cached_write_locked(int dev, off_t bnum, const void *data,
off_t num_blocks, int bsize);
extern int set_blocks_info(int dev, off_t *blocks, int nblocks,
void (*func)(off_t bnum, size_t nblocks, void *arg),
void *arg);
extern size_t read_phys_blocks(int fd, off_t bnum, void *data, uint num_blocks, int bsize);
extern size_t write_phys_blocks(int fd, off_t bnum, void *data, uint num_blocks, int bsize);
#ifdef __cplusplus
}
#endif
#endif /* _CACHE_H_ */
-11
View File
@@ -1,11 +0,0 @@
/*
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
#ifndef _SYS_DEFINES_H
#define _SYS_DEFINES_H
#define SYS_THREAD_ARG_LENGTH_MAX 255
#define SYS_THREAD_STRING_LENGTH_MAX 2048
#endif /* _SYS_DEFINES_H */
-23
View File
@@ -1,23 +0,0 @@
/*
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
#ifndef _KERNEL_FAULTS_PRIV_H
#define _KERNEL_FAULTS_PRIV_H
int general_protection_fault(int errorcode);
enum fpu_faults {
FPU_FAULT_CODE_UNKNOWN = 0,
FPU_FAULT_CODE_DIVBYZERO,
FPU_FAULT_CODE_INVALID_OP,
FPU_FAULT_CODE_OVERFLOW,
FPU_FAULT_CODE_UNDERFLOW,
FPU_FAULT_CODE_INEXACT
};
int fpu_fault(int fpu_fault);
int fpu_disable_fault(void);
#endif
-56
View File
@@ -1,56 +0,0 @@
/* pools.h
* simple fixed size block allocator
*/
#ifndef _KERNEL_POOLS_H
#define _KERNEL_POOLS_H
#include <lock.h>
typedef struct pool_ctl pool_ctl;
struct pool_mem {
struct pool_mem *next;
region_id aid;
char *base_addr;
size_t mem_size;
char *ptr;
size_t avail;
benaphore lock;
};
#define FREE_MAGIC 'BORK'
struct free_blk {
uint32 magic;
struct free_blk *next;
uint32 magic_check;
};
#define POOL_USES_BENAPHORES 0
#define POOL_DEBUG_NAME_SZ 32
struct pool_ctl {
struct pool_mem *list;
struct free_blk *freelist;
size_t alloc_size;
size_t block_size;
#if POOL_USES_BENAPHORES
benaphore lock;
#else
rw_lock lock;
#endif
int debug : 1;
char name[POOL_DEBUG_NAME_SZ];
};
int32 pool_init(pool_ctl **p, size_t sz);
void *pool_get(pool_ctl *p);
void pool_put(pool_ctl *p, void *ptr);
void pool_destroy(pool_ctl *p);
void pool_debug(struct pool_ctl *p, char *name);
void pool_debug_walk(pool_ctl *p);
#endif /* _KERNEL_POOLS_H */