Ignore:
Timestamp:
Dec 9, 2017, 5:05:16 PM (17 months ago)
Author:
nmedfort
Message:

Minor changes and hopefully a fix for bug exposed by base64 test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/toolchain/object_cache.cpp

    r5761 r5771  
    119119                if (kernel->hasSignature()) {
    120120                    const MDString * const sig = getSignature(M.get());
    121                     assert ("signature is missing from kernel file: possible module naming conflict?" && sig);
     121                    assert ("signature is missing from kernel file: possible module naming conflict or change in the LLVM metadata storage policy?" && sig);
    122122                    if (LLVM_UNLIKELY(sig == nullptr || !sig->getString().equals(kernel->makeSignature(idb)))) {
    123123                        goto invalid;
     
    200200
    201201void ParabixObjectCache::performIncrementalCacheCleanupStep() {
    202     if (mCacheCleanupIterator != fs::directory_iterator()) {
    203         const auto e = mCacheCleanupIterator->path();
    204         mCacheCleanupIterator++;
     202    mCleanupMutex.lock();
     203    if (LLVM_UNLIKELY(mCleanupIterator == fs::directory_iterator())) {
     204        mCleanupMutex.unlock();
     205    } else {
     206        const auto e = mCleanupIterator->path();
     207        mCleanupIterator++;
     208        mCleanupMutex.unlock();
     209
    205210        // Simple clean-up policy: files that haven't been touched by the
    206211        // driver in MaxCacheEntryHours are deleted.
     
    232237        sys::fs::create_directories(mCachePath);
    233238    }
    234     fs::directory_iterator it(p);
    235     mCacheCleanupIterator = it;
     239    mCleanupIterator = fs::directory_iterator(p);
    236240}
    237241
Note: See TracChangeset for help on using the changeset viewer.