aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include
diff options
context:
space:
mode:
Diffstat (limited to 'platform/linux-generic/include')
-rw-r--r--platform/linux-generic/include/odp_global_data.h2
-rw-r--r--platform/linux-generic/include/odp_timer_internal.h13
2 files changed, 4 insertions, 11 deletions
diff --git a/platform/linux-generic/include/odp_global_data.h b/platform/linux-generic/include/odp_global_data.h
index f1be1502c..a12d12973 100644
--- a/platform/linux-generic/include/odp_global_data.h
+++ b/platform/linux-generic/include/odp_global_data.h
@@ -40,6 +40,7 @@ typedef struct {
/* Read-only global data. Members should not be modified after global init
* to enable process more support. */
struct odp_global_data_ro_t {
+ odp_init_t init_param;
/* directory for odp mmaped files */
char *shm_dir;
/* overload default with env */
@@ -69,6 +70,7 @@ struct odp_global_data_rw_t {
pthread_t inotify_thread;
int inotify_pcapng_is_running;
odp_bool_t dpdk_initialized;
+ odp_bool_t inline_timers;
};
extern struct odp_global_data_ro_t odp_global_ro;
diff --git a/platform/linux-generic/include/odp_timer_internal.h b/platform/linux-generic/include/odp_timer_internal.h
index 8dda9e6ff..02ba92e0d 100644
--- a/platform/linux-generic/include/odp_timer_internal.h
+++ b/platform/linux-generic/include/odp_timer_internal.h
@@ -19,6 +19,7 @@
#include <odp_buffer_internal.h>
#include <odp_pool_internal.h>
#include <odp/api/timer.h>
+#include <odp_global_data.h>
/* Minimum number of scheduling rounds between checking timer pools. */
#define CONFIG_TIMER_RUN_RATELIMIT_ROUNDS 1
@@ -38,22 +39,12 @@ typedef struct {
odp_timer_t timer;
} odp_timeout_hdr_t;
-/*
- * Whether to run timer pool processing 'inline' (on worker cores) or in
- * background threads (thread-per-timerpool).
- *
- * If the application will use both scheduler and timer this flag is set
- * to true, otherwise false. This application conveys this information via
- * the 'not_used' bits in odp_init_t which are passed to odp_global_init().
- */
-extern odp_bool_t inline_timers;
-
unsigned _timer_run(void);
/* Static inline wrapper to minimize modification of schedulers. */
static inline unsigned timer_run(void)
{
- return inline_timers ? _timer_run() : 0;
+ return odp_global_rw->inline_timers ? _timer_run() : 0;
}
#endif