X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Finclude%2Frte_lcore.h;fp=lib%2Flibrte_eal%2Fcommon%2Finclude%2Frte_lcore.h;h=11f481c52589ff5f57c6d75d793c7c62c0aa33a7;hp=c89e6bab14f2a9ef52e3bfbced57f3104f908067;hb=339341e8e126a34381861b7347a8ad4ffb9cb293;hpb=7e9b25a738dc722c6db43c650311d9908f5bd15d diff --git a/lib/librte_eal/common/include/rte_lcore.h b/lib/librte_eal/common/include/rte_lcore.h index c89e6bab14..11f481c525 100644 --- a/lib/librte_eal/common/include/rte_lcore.h +++ b/lib/librte_eal/common/include/rte_lcore.h @@ -262,6 +262,26 @@ void rte_thread_get_affinity(rte_cpuset_t *cpusetp); */ int rte_thread_setname(pthread_t id, const char *name); +/** + * Create a control thread. + * + * Wrapper to pthread_create(). + * + * @param thread + * Filled with the thread id of the new created thread. + * @param attr + * Attributes for the new thread. + * @param start_routine + * Function to be executed by the new thread. + * @param arg + * Argument passed to start_routine. + * @return + * On success, returns 0; on error, it returns a negative value + * corresponding to the error number. + */ +int rte_ctrl_thread_create(pthread_t *thread, const pthread_attr_t *attr, + void *(*start_routine)(void *), void *arg); + /** * Test if the core supplied has a specific role *