|
|
| version 1.10, 2025/04/11 00:52:40 | version 1.12, 2025/04/11 16:23:18 |
|---|---|
| Line 24 | Line 24 |
| * along with FreeM. If not, see <https://www.gnu.org/licenses/>. | * along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
| * | * |
| * $Log$ | * $Log$ |
| * Revision 1.12 2025/04/11 16:23:18 snw | |
| * Avoid re-reading the same block consecutively when possible | |
| * | |
| * Revision 1.11 2025/04/11 14:21:03 snw | |
| * Make all but one of the read/write calls in global_bltin use gbl_read_block or gbl_write_block | |
| * | |
| * Revision 1.10 2025/04/11 00:52:40 snw | * Revision 1.10 2025/04/11 00:52:40 snw |
| * Replace all lseek/read calls in global handler to use gbl_read_block function | * Replace all lseek/read calls in global handler to use gbl_read_block function |
| * | * |
| Line 89 typedef struct global_handle { | Line 95 typedef struct global_handle { |
| global_header header; | global_header header; |
| long age; | long age; |
| long last_read_time; | |
| short opened; | short opened; |
| short locked; | short locked; |
| unsigned long last_block; | unsigned long last_block; |
| short have_cached_block; | |
| unsigned long cached_block_num; | |
| char *last_block_accessed; | |
| unsigned long use_count; /* how many times has it been accessed? */ | unsigned long use_count; /* how many times has it been accessed? */ |
| unsigned long read_ops; | unsigned long read_ops; |
| unsigned long write_ops; | unsigned long write_ops; |
| unsigned long memory_reads; | |
| unsigned long splits; | unsigned long splits; |
| unsigned long cache_misses; | unsigned long cache_misses; |
| unsigned long cache_hits; | unsigned long cache_hits; |
| Line 128 extern int gbl_update_tid(global_handle | Line 141 extern int gbl_update_tid(global_handle |
| extern int gbl_create(global_handle *g); | extern int gbl_create(global_handle *g); |
| extern short gbl_open(global_handle *g, short action); | extern short gbl_open(global_handle *g, short action); |
| extern int gbl_read_block(global_handle *g, unsigned long blocknum, char *block); | extern int gbl_read_block(global_handle *g, unsigned long blocknum, char *block); |
| extern int gbl_write_block(global_handle *g, unsigned long blocknum, char *block); | |
| extern global_handle *gbl_handle(char *key); | extern global_handle *gbl_handle(char *key); |
| #endif | #endif |