eo: Remove super bit from eo id

It is not required anymore as the super class and super bit can
be stored inside the object data. See the previous patches.
This commit is contained in:
Jean-Philippe Andre 2017-04-19 11:41:15 +09:00
parent 28d785ccb8
commit 9a81165830
2 changed files with 5 additions and 17 deletions

View File

@ -48,7 +48,7 @@ _eo_obj_pointer_invalid(const Eo_Id obj_id,
file, func_name, line,
"EOID %p is not a valid %s. "
"EOID domain=%i, current_domain=%i, local_domain=%i. "
"EOID generation=%lx, id=%lx, ref=%i, super=%i. "
"EOID generation=%lx, id=%lx, ref=%i. "
"Thread self=%s. "
"Available domains [%s %s %s %s]. "
"Maybe it has been deleted or does not belong to your thread?",
@ -60,7 +60,6 @@ _eo_obj_pointer_invalid(const Eo_Id obj_id,
(unsigned long)(obj_id & MASK_GENERATIONS),
(unsigned long)(obj_id >> SHIFT_ENTRY_ID) & (MAX_ENTRY_ID | MAX_TABLE_ID | MAX_MID_TABLE_ID),
(int)(obj_id >> REF_TAG_SHIFT) & 0x1,
(int)(obj_id >> SUPER_TAG_SHIFT) & 0x1,
tself,
(data->tables[0]) ? "0" : " ",
(data->tables[1]) ? "1" : " ",

View File

@ -62,11 +62,10 @@
# define BITS_MID_TABLE_ID 5
# define BITS_TABLE_ID 5
# define BITS_ENTRY_ID 11
# define BITS_GENERATION_COUNTER 6
# define BITS_GENERATION_COUNTER 7
# define BITS_DOMAIN 2
# define BITS_CLASS 1
# define REF_TAG_SHIFT 30
# define SUPER_TAG_SHIFT 31
# define REF_TAG_SHIFT 31
# define DROPPED_TABLES 0
# define DROPPED_ENTRIES 4
typedef int16_t Table_Index;
@ -76,11 +75,10 @@ typedef uint16_t Generation_Counter;
# define BITS_MID_TABLE_ID 11
# define BITS_TABLE_ID 11
# define BITS_ENTRY_ID 11
# define BITS_GENERATION_COUNTER 26
# define BITS_GENERATION_COUNTER 27
# define BITS_DOMAIN 2
# define BITS_CLASS 1
# define REF_TAG_SHIFT 62
# define SUPER_TAG_SHIFT 63
# define REF_TAG_SHIFT 63
# define DROPPED_TABLES 2
# define DROPPED_ENTRIES 3
typedef int16_t Table_Index;
@ -110,15 +108,6 @@ typedef uint32_t Generation_Counter;
#define MASK_ENTRY_ID ((1 << BITS_ENTRY_ID) - 1)
#define MASK_GENERATIONS (MAX_GENERATIONS - 1)
#define MASK_OBJ_TAG (((Eo_Id) 1) << (REF_TAG_SHIFT))
/* When we have EO_ID use the highest bit.
When we don't have EO_ID, we can repurpose the lowest bit, because allocation
is at least 8 byte aligned.
XXX: If this is ever not the case, we need to allocate from a mempool and ensure it, or find another trick. */
#ifdef HAVE_EO_ID
# define MASK_SUPER_TAG (((Eo_Id) 1) << (SUPER_TAG_SHIFT))
#else
# define MASK_SUPER_TAG ((Eo_Id) 1)
#endif
/* This only applies to classes. Used to artificially enlarge the class ids
* to reduce the likelihood of a clash with normal integers. */