コード例 #1
0
ファイル: wr_coremap.c プロジェクト: kimi8187/Pktgen-DPDK
static lcore_t *
set_thread_id_str(const char *unused, lcore_t *lc)
{
    (void)unused;
    lc->u.s.thread_id = get_next_thread_id(lc->next, lc->u.s.socket_id, lc->u.s.core_id);
    return lc;
}
コード例 #2
0
ファイル: wr_coremap.c プロジェクト: hemantagr/pktgen-dpdk
static unsigned
get_next_thread_id(const lcore_t *lc, unsigned socket_id, unsigned core_id)
{
	if (lc == NULL)
		return 0;
	if (lc->u.s.socket_id == socket_id && lc->u.s.core_id == core_id)
		return lc->u.s.thread_id + 1;
	return get_next_thread_id(lc->next, socket_id, core_id);
}