CNDP 22.08.0
Loading...
Searching...
No Matches
thread_private.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2019-2022 Intel Corporation
3 */
4
5#ifndef _THREAD_PRIVATE_H_
6#define _THREAD_PRIVATE_H_
7
8#include <pthread.h>
9#include <uid.h>
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#define THREAD_MAGIC_ID 0x20180403
21
22typedef void (*thd_func_t)(void *);
23
24struct thd_state {
25 char name[CNE_NAME_LEN];
26 uint32_t magic_id;
27 uint32_t running;
28 uintptr_t pid;
29 void *priv_;
31
32struct thd_params {
33 char name[CNE_NAME_LEN];
34 thd_func_t start_routine;
35 void *arg;
36 pthread_barrier_t barrier;
37 int tidx;
38};
39
40typedef struct thd_state thd_state_t;
41
42#ifdef __cplusplus
43}
44#endif
45
46#endif /* _THREAD_PRIVATE_H_ */
#define __cne_cache_aligned
Definition cne_common.h:379
void(*) thd_func_t(void *)
Definition cne_thread.h:39