2021-06-04 16:44 (UTC-0700), Narcisa Ana Maria Vasile:
From: Narcisa Vasile <redacted>
[...]
quoted hunk ↗ jump to hunk
diff --git a/lib/eal/windows/rte_thread.c b/lib/eal/windows/rte_thread.c
index 9e74a538c2..6dc3d575c0 100644
--- a/lib/eal/windows/rte_thread.c
+++ b/lib/eal/windows/rte_thread.c
@@ -202,6 +202,98 @@ rte_thread_get_affinity_by_id(rte_thread_t thread_id,
return ret;
}
+static HANDLE
+get_process_handle_from_thread_handle(HANDLE thread_handle)
+{
+ DWORD process_id = 0;
+
+ process_id = GetProcessIdOfThread(thread_handle);
+ if (process_id == 0) {
+ RTE_LOG_WIN32_ERR("GetProcessIdOfThread()");
+ return NULL;
+ }
+
+ return OpenProcess(PROCESS_SET_INFORMATION, FALSE, process_id);
+}
+
It is assumed all DPDK threads are created in current process,
existing code uses GetCurrentProcess(), so this can be dropped.