added threadPool to RU entity (FEP and FEP TX)
This commit is contained in:
@@ -395,17 +395,26 @@ void *trx_eth_write_udp_cmd(void *arg) {
|
||||
|
||||
int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, void *buff, int aid, int nsamps, int flags) {
|
||||
|
||||
#ifdef USE_TPOOL
|
||||
union udpTXReqUnion id = {.s={(uint64_t)timestamp,aid,nsamps,0}};
|
||||
notifiedFIFO_elt_t *req=newNotifiedFIFO_elt(sizeof(udpTXelem_t), id.p, device->respudpTX, trx_eth_write_udp_cmd);
|
||||
udpTXelem_t * udptxelem=(udpTXelem_t *) NotifiedFifoData(req);
|
||||
|
||||
#else
|
||||
udpTXelem_t udptxelem0;
|
||||
udpTXelem_t *udptxelem = &udptxelem0;
|
||||
#endif
|
||||
udptxelem->device = device;
|
||||
udptxelem->timestamp = timestamp;
|
||||
udptxelem->buff = buff;
|
||||
udptxelem->aid = aid;
|
||||
udptxelem->nsamps = nsamps;
|
||||
udptxelem->flags = flags;
|
||||
#ifdef USE_TPOOL
|
||||
pushTpool(device->threadPool,req);
|
||||
#else
|
||||
trx_eth_write_udp_cmd(udptxelem);
|
||||
#endif
|
||||
|
||||
}
|
||||
extern int oai_exit;
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ int trx_eth_start(openair0_device *device)
|
||||
eth->num_fd = 1; //max(device->openair0_cfg->rx_num_channels,device->openair0_cfg->tx_num_channels);
|
||||
printf("Creating %d UDP threads ...\n",device->openair0_cfg->rx_num_channels);
|
||||
udp_read_t *u[device->openair0_cfg->rx_num_channels];
|
||||
for (int i=0;i<device->openair0_cfg->rx_num_channels;i++) {
|
||||
for (int i=0;i<(device->openair0_cfg->rx_num_channels);i++) {
|
||||
u[i] = malloc(sizeof(udp_read_t));
|
||||
u[i]->thread_id=i;
|
||||
u[i]->device = device;
|
||||
|
||||
Reference in New Issue
Block a user