Thread (290 messages) flat view 290 messages, 13 authors, 2022-04-12

Re: [dpdk-dev] [PATCH v9 05/10] eal: implement thread priority management functions

From: Dmitry Kozlyuk <hidden>
Date: 2021-06-08 23:04:19

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help