123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #pragma once
- #include <library/cpp/actors/util/defs.h>
- #include <util/generic/hash.h>
- #include <util/string/printf.h>
- #define ACTORSLIB_COLLECT_EXEC_STATS
- namespace NActors {
- using TPoolId = ui8;
- using TPoolsMask = ui64;
- static constexpr TPoolId PoolBits = 6;
- static constexpr TPoolId MaxPools = (1 << PoolBits) - 1;
- static constexpr TPoolsMask WaitPoolsFlag = (1ull << MaxPools);
-
- static constexpr TPoolId CpuSpinning = MaxPools;
- static constexpr TPoolId CpuBlocked = MaxPools + 1;
- static constexpr TPoolId CpuStopped = TPoolId(-1);
- static constexpr TPoolId CpuShared = MaxPools;
- using TPoolWeight = ui16;
- static constexpr TPoolWeight MinPoolWeight = 1;
- static constexpr TPoolWeight DefPoolWeight = 32;
- static constexpr TPoolWeight MaxPoolWeight = 1024;
- using TWorkerId = ui16;
- static constexpr TWorkerId WorkerBits = 11;
- static constexpr TWorkerId MaxWorkers = 1 << WorkerBits;
- using TThreadId = ui64;
- static constexpr TThreadId UnknownThreadId = ui64(-1);
- struct TMailboxType {
- enum EType {
- Inherited = -1,
- Simple = 0,
- Revolving = 1,
- HTSwap = 2,
- ReadAsFilled = 3,
- TinyReadAsFilled = 4,
-
-
-
- };
- };
- struct TScopeId : std::pair<ui64, ui64> {
- using TBase = std::pair<ui64, ui64>;
- using TBase::TBase;
- static const TScopeId LocallyGenerated;
- };
- static inline TString ScopeIdToString(const TScopeId& scopeId) {
- return Sprintf("<%" PRIu64 ":%" PRIu64 ">", scopeId.first, scopeId.second);
- }
- }
- template<>
- struct hash<NActors::TScopeId> : hash<std::pair<ui64, ui64>> {};
- class TAffinity;
|