test: 🐛 换绑到核心2
This commit is contained in:
parent
b9b4932ad8
commit
d38be6aca9
@ -66,7 +66,7 @@ void *map_base_tx_case52; // T
|
|||||||
void *map_base_rx_case52; // RX映射地址 8块
|
void *map_base_rx_case52; // RX映射地址 8块
|
||||||
void *map_base_rxf_case52; // wr 计数映射地址
|
void *map_base_rxf_case52; // wr 计数映射地址
|
||||||
uint8_t w_idx, r_idx; // RX 信号
|
uint8_t w_idx, r_idx; // RX 信号
|
||||||
uint16_t txt_buffer[65535] = {0};
|
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
|
|
||||||
uint32_t slot_ind_flag = 0;
|
uint32_t slot_ind_flag = 0;
|
||||||
@ -151,7 +151,7 @@ void *handleUdpTransmission(void *arg)
|
|||||||
perror("open txt error!");
|
perror("open txt error!");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
uint16_t txt_buffer[65535] = {0};
|
||||||
for (int txt_num = 0; txt_num < 65535; txt_num++)
|
for (int txt_num = 0; txt_num < 65535; txt_num++)
|
||||||
{
|
{
|
||||||
if (fscanf(data_txt_fd, "%hu", &txt_buffer[txt_num]) != 1)
|
if (fscanf(data_txt_fd, "%hu", &txt_buffer[txt_num]) != 1)
|
||||||
@ -186,8 +186,7 @@ void *handleUdpTransmission(void *arg)
|
|||||||
printf("[while(1)]:/*************************************/\n");
|
printf("[while(1)]:/*************************************/\n");
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
printf("[while]");
|
printf("[slot]:%u \n", slot_ind_flag);
|
||||||
// printf("[slot]:%u \n", slot_ind_flag);
|
|
||||||
if (1 == slot_ind_flag)
|
if (1 == slot_ind_flag)
|
||||||
{
|
{
|
||||||
printf("[test 01]\n");
|
printf("[test 01]\n");
|
||||||
@ -607,7 +606,7 @@ int32_t test_case(uint32_t argc, int32_t* argvp)
|
|||||||
|
|
||||||
cpu_set_t udp_cpuset; // CPU集合
|
cpu_set_t udp_cpuset; // CPU集合
|
||||||
CPU_ZERO(&udp_cpuset); // 集合初始化
|
CPU_ZERO(&udp_cpuset); // 集合初始化
|
||||||
CPU_SET(1, &udp_cpuset); // 选择核心2
|
CPU_SET(2, &udp_cpuset); // 选择核心2
|
||||||
pthread_attr_setaffinity_np(&udp_attr, sizeof(udp_cpuset), &udp_cpuset); // 绑定
|
pthread_attr_setaffinity_np(&udp_attr, sizeof(udp_cpuset), &udp_cpuset); // 绑定
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user