For data loopback as in
https://github.com/KastnerRG/riffa/blob/master/c_c%2B%2B/linux/x64/test_apps/testutil.c#L149-L159 , is there a way to synchronize the thread execution sequence if I am trying to make a single send() thread and another single recv() thread ?
// Send the data
sent = fpga_send(fpga, chnl, sendBuffer, numWords, 0, 1, 25000);
printf("Test %d: words sent: %d\n", j, sent);
GET_TIME_VAL(1);
if (sent != 0) {
// Recv the data
recvd = fpga_recv(fpga, chnl, recvBuffer, numWords, 25000);
printf("Test %d: words recv: %d\n", j, recvd);
}