sfc 58 src/libsir/include/sir/filecache.h sirfileid _sir_fcache_add(sirfcache* sfc, const char* path, sir_levels levels, sfc 60 src/libsir/include/sir/filecache.h bool _sir_fcache_update(const sirfcache* sfc, sirfileid id, const sir_update_config_data* data); sfc 61 src/libsir/include/sir/filecache.h bool _sir_fcache_rem(sirfcache* sfc, sirfileid id); sfc 62 src/libsir/include/sir/filecache.h void _sir_fcache_shift(sirfcache* sfc, size_t idx); sfc 66 src/libsir/include/sir/filecache.h sirfile* _sir_fcache_find(const sirfcache* sfc, const void* match, sir_fcache_pred pred); sfc 68 src/libsir/include/sir/filecache.h bool _sir_fcache_destroy(sirfcache* sfc); sfc 69 src/libsir/include/sir/filecache.h bool _sir_fcache_dispatch(const sirfcache* sfc, sir_level level, sirbuf* buf, sfc 44 src/libsir/src/sirfilecache.c _SIR_LOCK_SECTION(sirfcache, sfc, SIRMI_FILECACHE, 0U); sfc 49 src/libsir/src/sirfilecache.c sirfileid retval = _sir_fcache_add(sfc, path, levels, opts); sfc 61 src/libsir/src/sirfilecache.c _SIR_LOCK_SECTION(const sirfcache, sfc, SIRMI_FILECACHE, false); sfc 62 src/libsir/src/sirfilecache.c bool retval = _sir_fcache_update(sfc, id, data); sfc 74 src/libsir/src/sirfilecache.c _SIR_LOCK_SECTION(sirfcache, sfc, SIRMI_FILECACHE, false); sfc 75 src/libsir/src/sirfilecache.c bool retval = _sir_fcache_rem(sfc, id); sfc 407 src/libsir/src/sirfilecache.c sirfileid _sir_fcache_add(sirfcache* sfc, const char* path, sir_levels levels, sfc 409 src/libsir/src/sirfilecache.c if (!_sir_validptr(sfc) || !_sir_validstr(path) || !_sir_validlevels(levels) || sfc 413 src/libsir/src/sirfilecache.c if (sfc->count >= SIR_MAXFILES) sfc 416 src/libsir/src/sirfilecache.c const sirfile* existing = _sir_fcache_find(sfc, (const void*)path, _sir_fcache_pred_path); sfc 426 src/libsir/src/sirfilecache.c sf->path, sf->id, sfc->count + 1); sfc 428 src/libsir/src/sirfilecache.c sfc->files[sfc->count++] = sf; sfc 442 src/libsir/src/sirfilecache.c bool _sir_fcache_update(const sirfcache* sfc, sirfileid id, const sir_update_config_data* data) { sfc 443 src/libsir/src/sirfilecache.c bool retval = _sir_validptr(sfc) && _sir_validfileid(id) && _sir_validupdatedata(data); sfc 446 src/libsir/src/sirfilecache.c sirfile* found = _sir_fcache_find(sfc, (const void*)&id, _sir_fcache_pred_id); sfc 453 src/libsir/src/sirfilecache.c bool _sir_fcache_rem(sirfcache* sfc, sirfileid id) { sfc 454 src/libsir/src/sirfilecache.c bool retval = _sir_validptr(sfc) && _sir_validfileid(id); sfc 458 src/libsir/src/sirfilecache.c for (size_t n = 0; n < sfc->count; n++) { sfc 459 src/libsir/src/sirfilecache.c SIR_ASSERT(_sirfile_validate(sfc->files[n])); sfc 461 src/libsir/src/sirfilecache.c if (sfc->files[n]->id == id) { sfc 463 src/libsir/src/sirfilecache.c sfc->files[n]->path, sfc->files[n]->id, sfc->count - 1); sfc 465 src/libsir/src/sirfilecache.c _sirfile_destroy(&sfc->files[n]); sfc 466 src/libsir/src/sirfilecache.c _sir_fcache_shift(sfc, n); sfc 468 src/libsir/src/sirfilecache.c sfc->count--; sfc 481 src/libsir/src/sirfilecache.c void _sir_fcache_shift(sirfcache* sfc, size_t idx) { sfc 482 src/libsir/src/sirfilecache.c if (_sir_validptr(sfc) && sfc->count <= SIR_MAXFILES) { sfc 483 src/libsir/src/sirfilecache.c for (size_t n = idx; n < sfc->count - 1; n++) { sfc 484 src/libsir/src/sirfilecache.c sfc->files[n] = sfc->files[n + 1]; sfc 485 src/libsir/src/sirfilecache.c sfc->files[n + 1] = NULL; sfc 565 src/libsir/src/sirfilecache.c sirfile* _sir_fcache_find(const sirfcache* sfc, const void* match, sir_fcache_pred pred) { sfc 566 src/libsir/src/sirfilecache.c bool valid = _sir_validptr(sfc) && _sir_validptr(match) && _sir_validfnptr(pred); sfc 569 src/libsir/src/sirfilecache.c for (size_t n = 0; n < sfc->count; n++) { sfc 570 src/libsir/src/sirfilecache.c if (pred(match, sfc->files[n])) sfc 571 src/libsir/src/sirfilecache.c return sfc->files[n]; sfc 578 src/libsir/src/sirfilecache.c bool _sir_fcache_destroy(sirfcache* sfc) { sfc 579 src/libsir/src/sirfilecache.c bool retval = _sir_validptr(sfc); sfc 582 src/libsir/src/sirfilecache.c while (sfc->count > 0) { sfc 583 src/libsir/src/sirfilecache.c size_t idx = sfc->count - 1; sfc 584 src/libsir/src/sirfilecache.c SIR_ASSERT(_sirfile_validate(sfc->files[idx])); sfc 585 src/libsir/src/sirfilecache.c _sirfile_destroy(&sfc->files[idx]); sfc 586 src/libsir/src/sirfilecache.c sfc->files[idx] = NULL; sfc 587 src/libsir/src/sirfilecache.c sfc->count--; sfc 590 src/libsir/src/sirfilecache.c (void)_sir_explicit_memset(sfc, 0, sizeof(sirfcache)); sfc 596 src/libsir/src/sirfilecache.c bool _sir_fcache_dispatch(const sirfcache* sfc, sir_level level, sirbuf* buf, sfc 598 src/libsir/src/sirfilecache.c bool retval = _sir_validptr(sfc) && _sir_validlevel(level) && sfc 609 src/libsir/src/sirfilecache.c for (size_t n = 0; n < sfc->count; n++) { sfc 610 src/libsir/src/sirfilecache.c SIR_ASSERT(_sirfile_validate(sfc->files[n])); sfc 612 src/libsir/src/sirfilecache.c if (!_sir_bittest(sfc->files[n]->levels, level)) { sfc 615 src/libsir/src/sirfilecache.c level, sfc->files[n]->levels, sfc->files[n]->path, sfc 616 src/libsir/src/sirfilecache.c sfc->files[n]->id); sfc 622 src/libsir/src/sirfilecache.c if (!wrote || sfc->files[n]->opts != lastopts) { sfc 623 src/libsir/src/sirfilecache.c wrote = _sir_format(false, sfc->files[n]->opts, buf); sfc 625 src/libsir/src/sirfilecache.c lastopts = sfc->files[n]->opts; sfc 628 src/libsir/src/sirfilecache.c if (wrote && _sirfile_write(sfc->files[n], wrote)) { sfc 632 src/libsir/src/sirfilecache.c sfc->files[n]->path, sfc->files[n]->id); sfc 216 src/libsir/src/sirinternal.c _SIR_LOCK_SECTION(sirfcache, sfc, SIRMI_FILECACHE, false); sfc 218 src/libsir/src/sirinternal.c bool destroyfc = _sir_fcache_destroy(sfc); sfc 751 src/libsir/src/sirinternal.c _SIR_LOCK_SECTION(const sirfcache, sfc, SIRMI_FILECACHE, false); sfc 754 src/libsir/src/sirinternal.c _sir_eqland(retval, _sir_fcache_dispatch(sfc, level, buf, &fdispatched, &fwanted));