summaryrefslogtreecommitdiff
path: root/src/lib/eo
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-04-19 11:41:15 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-04-19 11:41:15 +0900
commit9a81165830f56dde712b67627219ffb9304beac9 (patch)
treedf2570b9cbdf25d3b6c6c3c517466c9052aa3330 /src/lib/eo
parent28d785ccb8494812ead7c8db578cd226081b76ef (diff)
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.
Diffstat (limited to 'src/lib/eo')
-rw-r--r--src/lib/eo/eo_ptr_indirection.c3
-rw-r--r--src/lib/eo/eo_ptr_indirection.x19
2 files changed, 5 insertions, 17 deletions
diff --git a/src/lib/eo/eo_ptr_indirection.c b/src/lib/eo/eo_ptr_indirection.c
index 86ad204666..2ef278a438 100644
--- a/src/lib/eo/eo_ptr_indirection.c
+++ b/src/lib/eo/eo_ptr_indirection.c
@@ -48,7 +48,7 @@ _eo_obj_pointer_invalid(const Eo_Id obj_id,
48 file, func_name, line, 48 file, func_name, line,
49 "EOID %p is not a valid %s. " 49 "EOID %p is not a valid %s. "
50 "EOID domain=%i, current_domain=%i, local_domain=%i. " 50 "EOID domain=%i, current_domain=%i, local_domain=%i. "
51 "EOID generation=%lx, id=%lx, ref=%i, super=%i. " 51 "EOID generation=%lx, id=%lx, ref=%i. "
52 "Thread self=%s. " 52 "Thread self=%s. "
53 "Available domains [%s %s %s %s]. " 53 "Available domains [%s %s %s %s]. "
54 "Maybe it has been deleted or does not belong to your thread?", 54 "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,
60 (unsigned long)(obj_id & MASK_GENERATIONS), 60 (unsigned long)(obj_id & MASK_GENERATIONS),
61 (unsigned long)(obj_id >> SHIFT_ENTRY_ID) & (MAX_ENTRY_ID | MAX_TABLE_ID | MAX_MID_TABLE_ID), 61 (unsigned long)(obj_id >> SHIFT_ENTRY_ID) & (MAX_ENTRY_ID | MAX_TABLE_ID | MAX_MID_TABLE_ID),
62 (int)(obj_id >> REF_TAG_SHIFT) & 0x1, 62 (int)(obj_id >> REF_TAG_SHIFT) & 0x1,
63 (int)(obj_id >> SUPER_TAG_SHIFT) & 0x1,
64 tself, 63 tself,
65 (data->tables[0]) ? "0" : " ", 64 (data->tables[0]) ? "0" : " ",
66 (data->tables[1]) ? "1" : " ", 65 (data->tables[1]) ? "1" : " ",
diff --git a/src/lib/eo/eo_ptr_indirection.x b/src/lib/eo/eo_ptr_indirection.x
index ef3c0e0cb5..fcaa7874a8 100644
--- a/src/lib/eo/eo_ptr_indirection.x
+++ b/src/lib/eo/eo_ptr_indirection.x
@@ -62,11 +62,10 @@
62# define BITS_MID_TABLE_ID 5 62# define BITS_MID_TABLE_ID 5
63# define BITS_TABLE_ID 5 63# define BITS_TABLE_ID 5
64# define BITS_ENTRY_ID 11 64# define BITS_ENTRY_ID 11
65# define BITS_GENERATION_COUNTER 6 65# define BITS_GENERATION_COUNTER 7
66# define BITS_DOMAIN 2 66# define BITS_DOMAIN 2
67# define BITS_CLASS 1 67# define BITS_CLASS 1
68# define REF_TAG_SHIFT 30 68# define REF_TAG_SHIFT 31
69# define SUPER_TAG_SHIFT 31
70# define DROPPED_TABLES 0 69# define DROPPED_TABLES 0
71# define DROPPED_ENTRIES 4 70# define DROPPED_ENTRIES 4
72typedef int16_t Table_Index; 71typedef int16_t Table_Index;
@@ -76,11 +75,10 @@ typedef uint16_t Generation_Counter;
76# define BITS_MID_TABLE_ID 11 75# define BITS_MID_TABLE_ID 11
77# define BITS_TABLE_ID 11 76# define BITS_TABLE_ID 11
78# define BITS_ENTRY_ID 11 77# define BITS_ENTRY_ID 11
79# define BITS_GENERATION_COUNTER 26 78# define BITS_GENERATION_COUNTER 27
80# define BITS_DOMAIN 2 79# define BITS_DOMAIN 2
81# define BITS_CLASS 1 80# define BITS_CLASS 1
82# define REF_TAG_SHIFT 62 81# define REF_TAG_SHIFT 63
83# define SUPER_TAG_SHIFT 63
84# define DROPPED_TABLES 2 82# define DROPPED_TABLES 2
85# define DROPPED_ENTRIES 3 83# define DROPPED_ENTRIES 3
86typedef int16_t Table_Index; 84typedef int16_t Table_Index;
@@ -110,15 +108,6 @@ typedef uint32_t Generation_Counter;
110#define MASK_ENTRY_ID ((1 << BITS_ENTRY_ID) - 1) 108#define MASK_ENTRY_ID ((1 << BITS_ENTRY_ID) - 1)
111#define MASK_GENERATIONS (MAX_GENERATIONS - 1) 109#define MASK_GENERATIONS (MAX_GENERATIONS - 1)
112#define MASK_OBJ_TAG (((Eo_Id) 1) << (REF_TAG_SHIFT)) 110#define MASK_OBJ_TAG (((Eo_Id) 1) << (REF_TAG_SHIFT))
113/* When we have EO_ID use the highest bit.
114 When we don't have EO_ID, we can repurpose the lowest bit, because allocation
115 is at least 8 byte aligned.
116 XXX: If this is ever not the case, we need to allocate from a mempool and ensure it, or find another trick. */
117#ifdef HAVE_EO_ID
118# define MASK_SUPER_TAG (((Eo_Id) 1) << (SUPER_TAG_SHIFT))
119#else
120# define MASK_SUPER_TAG ((Eo_Id) 1)
121#endif
122 111
123/* This only applies to classes. Used to artificially enlarge the class ids 112/* This only applies to classes. Used to artificially enlarge the class ids
124 * to reduce the likelihood of a clash with normal integers. */ 113 * to reduce the likelihood of a clash with normal integers. */