mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-10-28 02:42:07 +00:00
Add flag for unloaded Zygisk modules
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <string>
|
||||
#include <functional>
|
||||
#include <string_view>
|
||||
#include <bitset>
|
||||
|
||||
#define UID_ROOT 0
|
||||
#define UID_SHELL 2000
|
||||
@@ -79,6 +80,24 @@ public:
|
||||
bool operator!=(const stateless_allocator&) { return false; }
|
||||
};
|
||||
|
||||
class dynamic_bitset {
|
||||
private:
|
||||
using long_bits = std::bitset<sizeof(unsigned long)>;
|
||||
std::vector<long_bits> bits;
|
||||
public:
|
||||
constexpr static int slot_size = sizeof(unsigned long);
|
||||
long_bits::reference operator[] (size_t pos) {
|
||||
size_t slot = pos / slot_size;
|
||||
size_t index = pos % slot_size;
|
||||
if (bits.size() <= slot) {
|
||||
bits.resize(slot + 1);
|
||||
}
|
||||
return bits[slot][index];
|
||||
}
|
||||
size_t slots() const { return bits.size(); }
|
||||
unsigned long to_ulong(size_t slot) const { return bits[slot].to_ulong(); }
|
||||
};
|
||||
|
||||
int parse_int(std::string_view s);
|
||||
|
||||
using thread_entry = void *(*)(void *);
|
||||
|
||||
Reference in New Issue
Block a user