Changeset 977 for trunk/client/src/dircache.c
- Timestamp:
- Sep 1, 2016, 5:12:21 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/src/dircache.c
r975 r977 14 14 15 15 extern PLUGINHELPERTABLE2L *ph; 16 17 /* 18 * An entry holds file name and a pointer to custom data 19 */ 20 typedef struct DirectoryCacheEntryData 21 { 22 const char fname[PATH_MAX]; 23 const void* customData; 24 } DirectoryCacheEntryData; 25 26 /* 27 * An entry in the directory cache contains one directory listing. 28 */ 29 typedef struct DirectoryCacheEntry 30 { 31 struct DirectoryCacheEntry *pNext; 32 struct DirectoryCacheEntry *pPrev; 33 34 DirectoryCacheEntryData *aInfos; 35 int cInfos; 36 int cInfosAllocated; 37 38 char *pszPath; 39 ULONG ulHash; 40 ULONG ulLastUpdateTime; 41 int fInvalid; 42 } DirectoryCacheEntry; 43 44 typedef struct DirectoryCache 45 { 46 NDMUTEX mutex; 47 48 DirectoryCacheEntry *pEntriesHead; 49 DirectoryCacheEntry *pEntriesTail; 50 int cEntries; 51 int fEnabled; 52 unsigned long ulExpirationTime; 53 int cMaxEntries; 54 // resource handle, used only for per-share logging 55 void* resource; 56 // callback called to release data structures 57 PFNFREEDIRENTRY release; 58 59 } DirectoryCache; 60 61 enum { 62 CacheFault = 0, 63 CacheOk = 1 64 }; 16 65 17 66 /*
Note:
See TracChangeset
for help on using the changeset viewer.