On Wed, 6 Jan 2021 21:45:43 +0200, Tal Shnaiderman wrote:
[...]
+/**
+ * Delete a TLS data key visible to all threads in the process
+ * rte_tls_key is the opaque pointer allocated by rte_thread_tls_key_create.
This line repeats @param key description.
+ *
+ * @param key
+ * The rte_tls_key allocated by rte_thread_tls_key_create().
+ *
+ * @return
+ * On success, zero.
+ * On failure, a negative number.
+ */
+__rte_experimental
+int rte_thread_tls_key_delete(rte_tls_key key);
[...]
+
+struct eal_tls_key {
+ pthread_key_t thread_index;
+};
+
+int
+rte_thread_tls_key_create(rte_tls_key *key, void (*destructor)(void *))
+{
+ int err;
+
+ *key = malloc(sizeof(*key));
Should be sizeof(**key), which would be sizeof(struct eal_tls_key), as needed.
Same for Windows file.
I had to double-check my comment on v7.