CNDP  22.08.0
cne_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 _CNE_PRIVATE_H_
6 #define _CNE_PRIVATE_H_
7 
15 #include <stdint.h>
16 #include <sys/queue.h>
17 
18 #include <cne_common.h>
19 #include <uid.h>
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 #define CNE_MAGIC_ID 0x20180403
37 typedef void (*on_exit_fn_t)(int sig, void *arg, int exit_type);
38 
39 struct cne_entry {
40  STAILQ_ENTRY(cne_entry) next;
41  char name[CNE_NAME_LEN];
42  uint32_t magic_id;
43  int uid;
44  void *priv_;
45 } __cne_cache_aligned;
46 
47 typedef struct cne_s {
48  uint32_t magic_id;
49  int initial_uid;
50  atomic_int active;
51  u_id_t pool;
52  on_exit_fn_t on_exit_fn;
53  void *on_exit_arg;
54  STAILQ_HEAD(, cne_entry) list;
55  struct cne_entry *entries;
56 } cne_private_t;
57 
58 #ifdef __cplusplus
59 }
60 #endif
61 
62 #endif /* _CNE_PRIVATE_H_ */
void(* on_exit_fn_t)(int sig, void *arg, int exit_type)
Definition: cne_private.h:37
void * u_id_t
Definition: uid.h:26