comparison TOOLS/cache2.c @ 9380:edfe34c5405d

linux->osdep
author arpi
date Sun, 09 Feb 2003 20:18:23 +0000
parents 5628c341f4ff
children
comparison
equal deleted inserted replaced
9379:475bb1a6ef75 9380:edfe34c5405d
1 1
2 // gcc cache2.c ../linux/shmem.o -o cache2 2 // gcc cache2.c ../osdep/shmem.o -o cache2
3 3
4 // Initial draft of my new cache system... 4 // Initial draft of my new cache system...
5 // includes some simulation code, using usleep() to emulate limited bandwith 5 // includes some simulation code, using usleep() to emulate limited bandwith
6 // TODO: seeking, data consistency checking 6 // TODO: seeking, data consistency checking
7 7
9 #define FILL_SPEED 10 9 #define FILL_SPEED 10
10 10
11 #include <stdio.h> 11 #include <stdio.h>
12 #include <stdlib.h> 12 #include <stdlib.h>
13 #include <string.h> 13 #include <string.h>
14 #include "../linux/shmem.h" 14 #include "../osdep/shmem.h"
15 15
16 typedef struct { 16 typedef struct {
17 // constats: 17 // constats:
18 void *buffer; // base pointer of the alllocated buffer memory 18 void *buffer; // base pointer of the alllocated buffer memory
19 int buffer_size; // size of the alllocated buffer memory 19 int buffer_size; // size of the alllocated buffer memory