96f97e5c8bfd5e57fb7d9c8eaab288db74c7d111
[dpdk.git] / lib / librte_eal / windows / eal_windows.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2020 Dmitry Kozlyuk
3  */
4
5 #ifndef _EAL_WINDOWS_H_
6 #define _EAL_WINDOWS_H_
7
8 /**
9  * @file Facilities private to Windows EAL
10  */
11
12 #include <rte_errno.h>
13 #include <rte_windows.h>
14
15 /**
16  * Create a map of processors and cores on the system.
17  *
18  * @return
19  *  0 on success, (-1) on failure and rte_errno is set.
20  */
21 int eal_create_cpu_map(void);
22
23 /**
24  * Create a thread.
25  *
26  * @param thread
27  *   The location to store the thread id if successful.
28  * @return
29  *   0 for success, -1 if the thread is not created.
30  */
31 int eal_thread_create(pthread_t *thread);
32
33 /**
34  * Get system NUMA node number for a socket ID.
35  *
36  * @param socket_id
37  *  Valid EAL socket ID.
38  * @return
39  *  NUMA node number to use with Win32 API.
40  */
41 unsigned int eal_socket_numa_node(unsigned int socket_id);
42
43 #endif /* _EAL_WINDOWS_H_ */