Changeset 3184 for trunk/src/lib/nt/kFsCache.h
- Timestamp:
- Mar 23, 2018, 11:36:43 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/nt/kFsCache.h
r2967 r3184 55 55 /** The max UTF-16 name length. */ 56 56 #define KFSCACHE_CFG_MAX_UTF16_NAME (256*2 + 16) 57 /** Enables locking of the cache and thereby making it thread safe. */ 58 #define KFSCACHE_CFG_LOCKING 1 57 59 58 60 … … 372 374 PKFSOBJ pFsObj; 373 375 } KFSHASHW; 376 #endif 377 378 379 /** @def KFSCACHE_LOCK 380 * Locks the cache exclusively. */ 381 /** @def KFSCACHE_UNLOCK 382 * Counterpart to KFSCACHE_LOCK. */ 383 #ifdef KFSCACHE_CFG_LOCKING 384 # define KFSCACHE_LOCK(a_pCache) EnterCriticalSection(&(a_pCache)->u.CritSect) 385 # define KFSCACHE_UNLOCK(a_pCache) LeaveCriticalSection(&(a_pCache)->u.CritSect) 386 #else 387 # define KFSCACHE_LOCK(a_pCache) do { } while (0) 388 # define KFSCACHE_UNLOCK(a_pCache) do { } while (0) 374 389 #endif 375 390 … … 440 455 KFSDIR RootDir; 441 456 457 #ifdef KFSCACHE_CFG_LOCKING 458 /** Critical section protecting the cache. */ 459 union 460 { 461 # ifdef _WINBASE_ 462 CRITICAL_SECTION CritSect; 463 # endif 464 KU64 abPadding[2 * 4 + 4 * sizeof(void *)]; 465 } u; 466 #endif 467 442 468 /** File system hash table for ANSI filename strings. */ 443 469 PKFSHASHA apAnsiPaths[KFSCACHE_CFG_PATH_HASH_TAB_SIZE];
Note:
See TracChangeset
for help on using the changeset viewer.