git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
eal: new function to create control threads
[dpdk.git]
/
lib
/
librte_eal
/
linuxapp
/
eal
/
eal_timer.c
diff --git
a/lib/librte_eal/linuxapp/eal/eal_timer.c
b/lib/librte_eal/linuxapp/eal/eal_timer.c
index
e0642de
..
1766f93
100644
(file)
--- a/
lib/librte_eal/linuxapp/eal/eal_timer.c
+++ b/
lib/librte_eal/linuxapp/eal/eal_timer.c
@@
-47,8
+47,8
@@
#include <rte_common.h>
#include <rte_log.h>
#include <rte_cycles.h>
#include <rte_common.h>
#include <rte_log.h>
#include <rte_cycles.h>
+#include <rte_lcore.h>
#include <rte_memory.h>
#include <rte_memory.h>
-#include <rte_memzone.h>
#include <rte_eal.h>
#include <rte_debug.h>
#include <rte_eal.h>
#include <rte_debug.h>
@@
-113,7
+113,7
@@
static pthread_t msb_inc_thread_id;
/*
* This function runs on a specific thread to update a global variable
/*
* This function runs on a specific thread to update a global variable
- * containing used to process MSB of the HPET (unfortunatel
l
y, we need
+ * containing used to process MSB of the HPET (unfortunately, we need
* this because hpet is 32 bits by default under linux).
*/
static void
* this because hpet is 32 bits by default under linux).
*/
static void
@@
-207,7
+207,7
@@
rte_eal_hpet_init(int make_default)
/* create a thread that will increment a global variable for
* msb (hpet is 32 bits by default under linux) */
/* create a thread that will increment a global variable for
* msb (hpet is 32 bits by default under linux) */
- ret =
p
thread_create(&msb_inc_thread_id, NULL,
+ ret =
rte_ctrl_
thread_create(&msb_inc_thread_id, NULL,
(void *(*)(void *))hpet_msb_inc, NULL);
if (ret != 0) {
RTE_LOG(ERR, EAL, "ERROR: Cannot create HPET timer thread!\n");
(void *(*)(void *))hpet_msb_inc, NULL);
if (ret != 0) {
RTE_LOG(ERR, EAL, "ERROR: Cannot create HPET timer thread!\n");
@@
-219,10
+219,10
@@
rte_eal_hpet_init(int make_default)
* Set thread_name for aid in debugging.
*/
snprintf(thread_name, RTE_MAX_THREAD_NAME_LEN, "hpet-msb-inc");
* Set thread_name for aid in debugging.
*/
snprintf(thread_name, RTE_MAX_THREAD_NAME_LEN, "hpet-msb-inc");
- ret =
pthread_setname_np
(msb_inc_thread_id, thread_name);
+ ret =
rte_thread_setname
(msb_inc_thread_id, thread_name);
if (ret != 0)
if (ret != 0)
- RTE_LOG(
ERR
, EAL,
- "
ERROR:
Cannot set HPET timer thread name!\n");
+ RTE_LOG(
DEBUG
, EAL,
+ "Cannot set HPET timer thread name!\n");
if (make_default)
eal_timer_source = EAL_TIMER_HPET;
if (make_default)
eal_timer_source = EAL_TIMER_HPET;
@@
-271,7
+271,7
@@
get_tsc_freq(void)
#ifdef CLOCK_MONOTONIC_RAW
#define NS_PER_SEC 1E9
#ifdef CLOCK_MONOTONIC_RAW
#define NS_PER_SEC 1E9
- struct timespec sleeptime = {.tv_nsec =
5E8 }; /* 1/2
second */
+ struct timespec sleeptime = {.tv_nsec =
NS_PER_SEC / 10 }; /* 1/10
second */
struct timespec t_start, t_end;
uint64_t tsc_hz;
struct timespec t_start, t_end;
uint64_t tsc_hz;