ADTast-experimentalpthread-emulationqualifiedEnum
Last change
on this file since 9939dc3 was
87b9332,
checked in by Andrew Beach <ajbeach@…>, 4 years ago
|
Moved 'examples/' to 'tests/zombies/'.
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[e47f529] | 1 | #pragma once |
---|
| 2 | |
---|
[6be0cf9] | 3 | // #include <stddef.h> |
---|
| 4 | // #include <stdint.h> |
---|
| 5 | // |
---|
| 6 | // static const size_t POOL_SIZE_EXP = 24; |
---|
| 7 | // static const size_t POOL_SIZE_BYTES = 0x1 << POOL_SIZE_EXP; |
---|
| 8 | // static const size_t POOL_PTR_MASK = ~(POOL_SIZE_BYTES - 1); |
---|
| 9 | // |
---|
| 10 | // static const size_t CARDS_SIZE_EXP = 12; |
---|
| 11 | // static const size_t CARDS_SIZE_BYTES = 0x1 << CARDS_SIZE_EXP; |
---|
| 12 | // static const size_t CARDS_OFFSET_MASK = (~(CARDS_SIZE_BYTES - 1)) & (POOL_SIZE_BYTES - 1); |
---|
| 13 | // static const size_t CARDS_COUNT = POOL_SIZE_BYTES / CARDS_SIZE_BYTES; |
---|
| 14 | // |
---|
| 15 | // static const size_t OBJECT_ALLIGNMENT = sizeof(size_t); |
---|
| 16 | // static const size_t OBJECT_PTR_MASK = ~(OBJECT_ALLIGNMENT - 1); |
---|
[e47f529] | 17 | |
---|
[1b5c81ed] | 18 | enum { |
---|
| 19 | POOL_SIZE_EXP = 24, |
---|
| 20 | POOL_SIZE_BYTES = 0x1 << POOL_SIZE_EXP, |
---|
| 21 | POOL_PTR_MASK = ~(POOL_SIZE_BYTES - 1), |
---|
[e47f529] | 22 | |
---|
[1b5c81ed] | 23 | CARDS_SIZE_EXP = 12, |
---|
| 24 | CARDS_SIZE_BYTES = 0x1 << CARDS_SIZE_EXP, |
---|
| 25 | CARDS_OFFSET_MASK = (~(CARDS_SIZE_BYTES - 1)) & (POOL_SIZE_BYTES - 1), |
---|
| 26 | CARDS_COUNT = POOL_SIZE_BYTES / CARDS_SIZE_BYTES, |
---|
[e47f529] | 27 | |
---|
[1b5c81ed] | 28 | OBJECT_ALLIGNMENT = sizeof(size_t), |
---|
| 29 | OBJECT_PTR_MASK = ~(OBJECT_ALLIGNMENT - 1), |
---|
| 30 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.