On 11/03/2014 11:50 AM, Shmulik Ladkani wrote:
Hi,
I'd like to suggest the following addition to odp_init.h:
diff --git a/platform/linux-generic/include/api/odp_init.h
b/platform/linux-generic/include/api/odp_init.h
index 8e018cbdba..9b75609fc7 100644
--- a/platform/linux-generic/include/api/odp_init.h
+++ b/platform/linux-generic/include/api/odp_init.h
@@ -108,6 +108,15 @@ int odp_term_global(void);
*/
int odp_init_local(void);
+/**
+ * Register a function to be called upon thread local initialization
+ *
+ * XXX: Should the 'init_local_fn' be invoked for currently existing threads?
+ * Probably yes.
+ * (Alternative: user must call 'odp_init_local_register' before the
+ * first 'odp_init_local' call)
+ */
+int odp_init_local_register(int (*init_local_fn)(void));
Motivation is to allow a custom library built on top of ODP to
initialize its per-thread local data structures.
Could you please elaborate it? What is a usecase?
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp