mirror of
https://github.com/open-simh/simtools.git
synced 2026-01-28 12:58:43 +00:00
Reorganize commands into separate modules - ods2.c was way too big. This reduces it from around 3000 LOC to less than 1K LOC. Reorder I/O so PHYVIRT mediates all physical access. Fix memory leaks of device structures. Reorganize Files-11 vs. internal structures. Allow more granular control of DEBUG from the makefile. Show VOLUME handles free space and tries to match geometry from SCB to known disk types. Fix many compilation warnings. Add code to allow dumping disk data for debug. Automatically generate descrip.mms from dependencies. Correctly handle directory default version limit; previously confused with file version limit. Teach help to sort tables for presentation; manually keeping them sorted is problematic, and code maintenance prefers functional groupings. Add the ability to initialize a Files-11 volume. (Not quite complete.) Add dependency generation to makefiles. Excludes system headers so makedepends isn't required to build. Simplify makefiles to use more recipes. Teach makefiles to list all sources and headers so it's easier to keep git and MSVC up-to-date. Add support for accessing images of disks with interleave/skew/offsets (e.g. RX02). Add VHD support, including ability to create a snapshot with mount/write. Teach RMS to handle NOSPAN variable length records correctly. Fix RMS GET handling of variable length records with VFC that span block boundaries. Fix delete file (a day-one incomplete). Still some cases to validate. Purge cache of modified blocks at rundown and at the end of each command. Do not allow deletion of reserved files. Move revision history to version.h Correct various permissions in git.
54 lines
2.0 KiB
C
54 lines
2.0 KiB
C
/* Cache.h Definitions for cache routines */
|
|
|
|
/*
|
|
This is part of ODS2 written by Paul Nankervis,
|
|
email address: Paulnank@au1.ibm.com
|
|
|
|
ODS2 is distributed freely for all members of the
|
|
VMS community to use. However all derived works
|
|
must maintain comments in their source to acknowledge
|
|
the contibution of the original author.
|
|
*/
|
|
|
|
#ifndef _CACHE_H
|
|
#define _CACHE_H
|
|
|
|
#ifdef VAXC /* Stupid VAX C doesn't allow "signed" keyword */
|
|
#define signed
|
|
#else
|
|
#define signed signed
|
|
#endif
|
|
|
|
struct CACHE {
|
|
struct CACHE *nextlru; /* next object on least recently used list */
|
|
struct CACHE *lastlru; /* last object on least recently used list */
|
|
struct CACHE *left; /* left branch of binary tree */
|
|
struct CACHE *right; /* right branch of binary tree */
|
|
struct CACHE **parent; /* address of pointer to this object */
|
|
void *(*objmanager) (struct CACHE * cacheobj,int flushonly);
|
|
unsigned hashval; /* object hash value */
|
|
short refcount; /* object reference count */
|
|
signed char balance; /* object tree imbalance factor */
|
|
signed char objtype; /* object type (for debugging) */
|
|
#define OBJTYPE_DEV 1
|
|
#define OBJTYPE_FCB 2
|
|
#define OBJTYPE_WCB 3
|
|
#define OBJTYPE_VIOC 7
|
|
};
|
|
|
|
void cache_show(void);
|
|
int cache_refcount(struct CACHE *cacheobj);
|
|
void cache_delete(struct CACHE *cacheobj);
|
|
void cache_purge(int all);
|
|
void cache_flush(void);
|
|
void cache_remove(struct CACHE *cacheobj);
|
|
void cache_touch(struct CACHE * cacheobj);
|
|
void cache_untouch(struct CACHE * cacheobj,int recycle);
|
|
void *cache_find( void **root, unsigned hashval, void *keyval, unsigned *retsts,
|
|
int (*compare_func) ( unsigned hashval, void *keyval,
|
|
void *node ),
|
|
void *(*create_func) ( unsigned hashval, void *keyval,
|
|
unsigned *retsts ) );
|
|
|
|
#endif /* #ifndef _CACHE_H */
|