2023-03-17 20:07:19 +00:00
|
|
|
#ifndef SOCKS_PERCPU_H_
|
|
|
|
|
#define SOCKS_PERCPU_H_
|
|
|
|
|
|
2023-03-18 19:35:00 +00:00
|
|
|
#include <socks/status.h>
|
2023-03-17 20:07:19 +00:00
|
|
|
#include <socks/compiler.h>
|
|
|
|
|
|
2023-03-20 20:41:39 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-03-17 20:07:19 +00:00
|
|
|
#define DEFINE_PERCPU_VAR(type, name) \
|
|
|
|
|
__section(".data.percpu") type name
|
|
|
|
|
|
|
|
|
|
#define percpu_get(var) __percpu_get(var)
|
|
|
|
|
|
|
|
|
|
#define percpu_put(var)
|
|
|
|
|
|
2023-03-18 19:35:00 +00:00
|
|
|
extern kern_status_t init_per_cpu_areas(void);
|
2023-03-17 20:07:19 +00:00
|
|
|
extern void *__percpu_get(void *var);
|
|
|
|
|
|
2023-03-20 20:41:39 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-03-17 20:07:19 +00:00
|
|
|
#endif
|