Switch to unified view

a/src/index/fsindexer.h b/src/index/fsindexer.h
...
...
16
 */
16
 */
17
#ifndef _fsindexer_h_included_
17
#ifndef _fsindexer_h_included_
18
#define _fsindexer_h_included_
18
#define _fsindexer_h_included_
19
19
20
#include <list>
20
#include <list>
21
#include <mutex>
21
22
22
#include "indexer.h"
23
#include "indexer.h"
23
#include "fstreewalk.h"
24
#include "fstreewalk.h"
24
#ifdef IDX_THREADS
25
#ifdef IDX_THREADS
25
#include "ptmutex.h"
26
#include "workqueue.h"
26
#include "workqueue.h"
27
#endif // IDX_THREADS
27
#endif // IDX_THREADS
28
28
29
class DbIxStatusUpdater;
29
class DbIxStatusUpdater;
30
class FIMissingStore;
30
class FIMissingStore;
...
...
91
        // This test does not need to be protected: the value is set at
91
        // This test does not need to be protected: the value is set at
92
        // init and never changed.
92
        // init and never changed.
93
        if (!dorecord)
93
        if (!dorecord)
94
        return;
94
        return;
95
#ifdef IDX_THREADS
95
#ifdef IDX_THREADS
96
      PTMutexLocker locker(mutex);
96
      std::unique_lock<std::mutex> locker(mutex);
97
#endif
97
#endif
98
        udis.push_back(udi);
98
        udis.push_back(udi);
99
    }
99
    }
100
    const vector<string>& getCandidates() 
100
    const vector<string>& getCandidates() 
101
    {
101
    {
102
        return udis;
102
        return udis;
103
    }
103
    }
104
    private:
104
    private:
105
#ifdef IDX_THREADS
105
#ifdef IDX_THREADS
106
  PTMutexInit mutex;
106
        std::mutex mutex;
107
#endif
107
#endif
108
    bool dorecord;
108
    bool dorecord;
109
    std::vector<std::string> udis;
109
    std::vector<std::string> udis;
110
    };
110
    };
111
111