diff options
author | Jonas Suhr Christensen <jsc@umbraculum.org> | 2015-04-10 17:39:19 +0200 |
---|---|---|
committer | Jonas Suhr Christensen <jsc@umbraculum.org> | 2015-04-10 17:39:19 +0200 |
commit | 483d4a25ee529f0f577ea1ff26c570ecd88c2a63 (patch) | |
tree | e69b39d7ecfb72b60cde0be664223490a51f3158 /src/cachemanager.h | |
parent | 1f43d7514387b4585b9a4e0ffac361a03d593e5e (diff) |
Added clean type event. Help functions. And more cache manager logic.
Diffstat (limited to 'src/cachemanager.h')
-rw-r--r-- | src/cachemanager.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/cachemanager.h b/src/cachemanager.h index b30de4c..6a14429 100644 --- a/src/cachemanager.h +++ b/src/cachemanager.h @@ -91,14 +91,20 @@ private: void *b; } cache_t; + enum cmd_t { + LOADNEXT = 0, + CLEAN = 1 + }; + typedef struct { + bool active; cacheid_t id; + cmd_t cmd; } event_t; + CacheManager::event_t createEvent(cacheid_t id, cmd_t type); void loadNext(cacheid_t id); void pushEvent(event_t e); - cacheid_t leaseId(); - cacheid_t releaseId(); // Protected by mutex std::list<event_t> eventqueue; |