Update Stellar export header and add stellar_get_current_thread_index() function
This commit is contained in:
@@ -10,11 +10,11 @@
|
||||
|
||||
#include "logo.h"
|
||||
#include "stat.h"
|
||||
#include "stellar.h"
|
||||
#include "config.h"
|
||||
#include "packet_private.h"
|
||||
#include "packet_priv.h"
|
||||
#include "packet_io.h"
|
||||
#include "timestamp.h"
|
||||
#include "thread_idx.h"
|
||||
#include "id_generator.h"
|
||||
#include "ip_reassembly.h"
|
||||
#include "session_manager.h"
|
||||
@@ -159,7 +159,6 @@ static void *work_thread(void *arg)
|
||||
{
|
||||
int nr_recv;
|
||||
uint64_t now = 0;
|
||||
uint16_t thr_idx = 0;
|
||||
char thd_name[16] = {0};
|
||||
void *plugin_ctx = NULL;
|
||||
struct packet *pkt = NULL;
|
||||
@@ -170,7 +169,8 @@ static void *work_thread(void *arg)
|
||||
struct stellar_thread *thread = (struct stellar_thread *)arg;
|
||||
struct ip_reassembly *ip_reass = thread->ip_mgr;
|
||||
struct session_manager *sess_mgr = thread->sess_mgr;
|
||||
thr_idx = thread->idx;
|
||||
uint16_t thr_idx = thread->idx;
|
||||
stellar_set_current_thread_index(thr_idx);
|
||||
|
||||
snprintf(thd_name, sizeof(thd_name), "stellar:%d", thr_idx);
|
||||
prctl(PR_SET_NAME, (unsigned long long)thd_name, NULL, NULL, NULL);
|
||||
|
||||
Reference in New Issue
Block a user