summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2018-01-16 19:48:49 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2018-01-16 19:50:52 +0900
commitdd2f450ea7558171a567c1da0e9eb7ef8b324778 (patch)
tree8fade32a3fdce14e2ab76ecb66344ed11b7e7430
parent8b4abdcd0e11db61d2bad4bdff4ca20e6212bce2 (diff)
eo: Fix make check
The cache had a generation count, removing this check breaks eo suite. EO is designed to tolerate init/shutdown cycles (as long as dlopen/dlclose isn't involved). Note: the ugly goto are useless as GCC -O2 understands EINA_(UN)LIKELY and deals with it as expected (just look at the asm produced). See 34d9f2070696027199a56cb621c0526ea1430e8f
-rw-r--r--src/lib/eo/Eo.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 8b489ab72a..a26e9fb7a6 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -1177,10 +1177,12 @@ typedef struct _Efl_Object_Op_Call_Data
1177 1177
1178// cache OP id, get real fct and object data then do the call 1178// cache OP id, get real fct and object data then do the call
1179#define EFL_FUNC_COMMON_OP(Obj, Name, DefRet) \ 1179#define EFL_FUNC_COMMON_OP(Obj, Name, DefRet) \
1180 static Efl_Object_Op ___op; /* static 0 by default */ \ 1180 static Efl_Object_Op ___op = 0; \
1181 static unsigned int ___generation = 0; \
1181 Efl_Object_Op_Call_Data ___call; \ 1182 Efl_Object_Op_Call_Data ___call; \
1182 _Eo_##Name##_func _func_; \ 1183 _Eo_##Name##_func _func_; \
1183 if (EINA_UNLIKELY(___op == EFL_NOOP)) \ 1184 if (EINA_UNLIKELY((___op == EFL_NOOP) || \
1185 (___generation != _efl_object_init_generation))) \
1184 goto __##Name##_op_create; /* yes a goto - see below */ \ 1186 goto __##Name##_op_create; /* yes a goto - see below */ \
1185 __##Name##_op_create_done: EINA_HOT; \ 1187 __##Name##_op_create_done: EINA_HOT; \
1186 if (EINA_UNLIKELY(!_efl_object_call_resolve( \ 1188 if (EINA_UNLIKELY(!_efl_object_call_resolve( \
@@ -1199,6 +1201,7 @@ typedef struct _Efl_Object_Op_Call_Data
1199#define EFL_FUNC_COMMON_OP_END(Obj, Name, DefRet, ErrorCase) \ 1201#define EFL_FUNC_COMMON_OP_END(Obj, Name, DefRet, ErrorCase) \
1200__##Name##_op_create: EINA_COLD; \ 1202__##Name##_op_create: EINA_COLD; \
1201 ___op = _efl_object_op_api_id_get(EFL_FUNC_COMMON_OP_FUNC(Name), Obj, #Name, __FILE__, __LINE__); \ 1203 ___op = _efl_object_op_api_id_get(EFL_FUNC_COMMON_OP_FUNC(Name), Obj, #Name, __FILE__, __LINE__); \
1204 ___generation = _efl_object_init_generation; \
1202 if (EINA_UNLIKELY(___op == EFL_NOOP)) goto __##Name##_failed; \ 1205 if (EINA_UNLIKELY(___op == EFL_NOOP)) goto __##Name##_failed; \
1203 goto __##Name##_op_create_done; \ 1206 goto __##Name##_op_create_done; \
1204__##Name##_failed: EINA_COLD; \ 1207__##Name##_failed: EINA_COLD; \