eal/bsd: rename bsdapp to freebsd
[dpdk.git] / lib / librte_eal / linuxapp / eal / eal_timer.c
index 161322f..bc8f051 100644 (file)
@@ -87,7 +87,7 @@ static pthread_t msb_inc_thread_id;
  * containing used to process MSB of the HPET (unfortunately, we need
  * this because hpet is 32 bits by default under linux).
  */
-static void
+static void *
 hpet_msb_inc(__attribute__((unused)) void *arg)
 {
        uint32_t t;
@@ -98,6 +98,7 @@ hpet_msb_inc(__attribute__((unused)) void *arg)
                        eal_hpet_msb ++;
                sleep(10);
        }
+       return NULL;
 }
 
 uint64_t
@@ -137,7 +138,6 @@ int
 rte_eal_hpet_init(int make_default)
 {
        int fd, ret;
-       char thread_name[RTE_MAX_THREAD_NAME_LEN];
 
        if (internal_config.no_hpet) {
                RTE_LOG(NOTICE, EAL, "HPET is disabled\n");
@@ -178,23 +178,14 @@ 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) */
-       ret = pthread_create(&msb_inc_thread_id, NULL,
-                       (void *(*)(void *))hpet_msb_inc, NULL);
+       ret = rte_ctrl_thread_create(&msb_inc_thread_id, "hpet-msb-inc", NULL,
+                                    hpet_msb_inc, NULL);
        if (ret != 0) {
                RTE_LOG(ERR, EAL, "ERROR: Cannot create HPET timer thread!\n");
                internal_config.no_hpet = 1;
                return -1;
        }
 
-       /*
-        * Set thread_name for aid in debugging.
-        */
-       snprintf(thread_name, RTE_MAX_THREAD_NAME_LEN, "hpet-msb-inc");
-       ret = rte_thread_setname(msb_inc_thread_id, thread_name);
-       if (ret != 0)
-               RTE_LOG(DEBUG, EAL,
-                       "Cannot set HPET timer thread name!\n");
-
        if (make_default)
                eal_timer_source = EAL_TIMER_HPET;
        return 0;