Minor fixes
This commit is contained in:
committed by
francescomani
parent
ff4c48f952
commit
f8d0c3de03
@@ -139,11 +139,7 @@ void send_T_messages_txt(void *forwarder) {
|
|||||||
/* TODO: be careful, we use internal T stuff, to rewrite? */
|
/* TODO: be careful, we use internal T stuff, to rewrite? */
|
||||||
T_LOCAL_size = 0;
|
T_LOCAL_size = 0;
|
||||||
T_HEADER(T_ID(-1));
|
T_HEADER(T_ID(-1));
|
||||||
T_PUT_buffer(1, ((T_buffer) {
|
T_PUT_buffer(1, ((T_buffer) { .addr= (src), .length= (send_size) }));
|
||||||
.addr=
|
|
||||||
(src), .length=
|
|
||||||
(send_size)
|
|
||||||
}));
|
|
||||||
forward(forwarder, buf, T_LOCAL_size);
|
forward(forwarder, buf, T_LOCAL_size);
|
||||||
src += send_size;
|
src += send_size;
|
||||||
src_len -= send_size;
|
src_len -= send_size;
|
||||||
|
|||||||
@@ -286,29 +286,31 @@ static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_
|
|||||||
notifiedFIFO_elt_t *msg= pullNotifiedFIFO(responseFifo);
|
notifiedFIFO_elt_t *msg= pullNotifiedFIFO(responseFifo);
|
||||||
if (msg == NULL)
|
if (msg == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
AssertFatal(t->traceFd, "Thread pool used while not initialized");
|
AssertFatal(t->traceFd > 0, "Thread pool used while not initialized");
|
||||||
if (t->measurePerf)
|
if (t->measurePerf)
|
||||||
msg->returnTime=rdtsc_oai();
|
msg->returnTime=rdtsc_oai();
|
||||||
|
|
||||||
if (t->traceFd > 0)
|
if (t->traceFd > 0) {
|
||||||
if(write(t->traceFd, msg, sizeof(*msg)))
|
ssize_t b = write(t->traceFd, msg, sizeof(*msg));
|
||||||
{};
|
AssertFatal(b > 0, "error in write(): %d, %s\n", errno, strerror(errno));
|
||||||
|
}
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline notifiedFIFO_elt_t *tryPullTpool(notifiedFIFO_t *responseFifo, tpool_t *t) {
|
static inline notifiedFIFO_elt_t *tryPullTpool(notifiedFIFO_t *responseFifo, tpool_t *t) {
|
||||||
notifiedFIFO_elt_t *msg= pollNotifiedFIFO(responseFifo);
|
notifiedFIFO_elt_t *msg= pollNotifiedFIFO(responseFifo);
|
||||||
AssertFatal(t->traceFd, "Thread pool used while not initialized");
|
AssertFatal(t->traceFd > 0, "Thread pool used while not initialized");
|
||||||
if (msg == NULL)
|
if (msg == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (t->measurePerf)
|
if (t->measurePerf)
|
||||||
msg->returnTime=rdtsc_oai();
|
msg->returnTime=rdtsc_oai();
|
||||||
|
|
||||||
if (t->traceFd)
|
if (t->traceFd > 0) {
|
||||||
if(write(t->traceFd, msg, sizeof(*msg)))
|
ssize_t b = write(t->traceFd, msg, sizeof(*msg));
|
||||||
{};
|
AssertFatal(b > 0, "error in write(): %d, %s\n", errno, strerror(errno));
|
||||||
|
}
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2685,7 +2685,7 @@ allocate_prbs_sub(int nb_rb,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 25:
|
case 25:
|
||||||
if (check == (N_RBG - 1)) {
|
if (check == N_RBG - 1) {
|
||||||
nb_rb--;
|
nb_rb--;
|
||||||
} else {
|
} else {
|
||||||
nb_rb -= 2;
|
nb_rb -= 2;
|
||||||
@@ -2694,7 +2694,7 @@ allocate_prbs_sub(int nb_rb,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 50:
|
case 50:
|
||||||
if (check == (N_RBG - 1)) {
|
if (check == N_RBG - 1) {
|
||||||
nb_rb -= 2;
|
nb_rb -= 2;
|
||||||
} else {
|
} else {
|
||||||
nb_rb -= 3;
|
nb_rb -= 3;
|
||||||
|
|||||||
Reference in New Issue
Block a user