implement dynamically allocateable guest to host callbacks

This commit is contained in:
disjtqz
2023-10-11 11:58:15 -04:00
committed by Radosław Gliński
parent d0a6cec024
commit 43fd396db7
5 changed files with 243 additions and 43 deletions

View File

@@ -32,7 +32,7 @@ class BitMap {
// (threadsafe) Acquires an entry and returns its index. Returns -1 if there
// are no more free entries.
size_t Acquire();
size_t AcquireFromBack();
// (threadsafe) Releases an entry by an index.
void Release(size_t index);
@@ -49,6 +49,7 @@ class BitMap {
const static size_t kDataSize = 8;
const static size_t kDataSizeBits = kDataSize * 8;
std::vector<uint64_t> data_;
inline size_t TryAcquireAt(size_t i);
};
} // namespace xe