Ignore:
Timestamp:
Dec 8, 2017, 1:55:22 AM (22 months ago)
Author:
nmedfort
Message:

Cache signature is now written into .kernel bitcode file. Minor bug fix and revision of GrepEngine::DoGrepThreadMethod?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/grep_engine.h

    r5735 r5761  
    1313#include <sstream>
    1414#include <mutex>
     15#include <atomic>
    1516
    1617namespace re { class CC; }
     
    2324
    2425class GrepEngine {
     26    enum class FileStatus {Pending, GrepComplete, PrintComplete};
    2527public:
    2628
     
    4244    Driver * mGrepDriver;
    4345
    44     enum class FileStatus {Pending, InGrep, GrepComplete, Printing, PrintComplete};
    45     std::mutex count_mutex;
    46     size_t mNextFileToGrep;
    47     size_t mNextFileToPrint;
     46    std::atomic<unsigned> mNextFileToGrep;
     47    std::atomic<unsigned> mNextFileToPrint;
    4848    std::vector<std::string> inputFiles;
    4949    std::vector<std::unique_ptr<std::stringstream>> mResultStrs;
    5050    std::vector<FileStatus> mFileStatus;
     51    std::mutex mWriteMutex;
     52    std::mutex mCacheMutex;
     53
     54
    5155    bool grepMatchFound;
    5256   
Note: See TracChangeset for help on using the changeset viewer.