Merge pull request #768 from freechipsproject/flush_jtag_vpi
jtag_vpi: Attempt to more aggressively flush the simulator output
This commit is contained in:
commit
f61e30763f
@ -78,14 +78,18 @@ int init_jtag_server(int port)
|
|||||||
socklen_t socklen = sizeof(serv_addr);
|
socklen_t socklen = sizeof(serv_addr);
|
||||||
if (getsockname(listenfd, (struct sockaddr *)&serv_addr, &socklen) == -1) {
|
if (getsockname(listenfd, (struct sockaddr *)&serv_addr, &socklen) == -1) {
|
||||||
perror("init_jtag_server");
|
perror("init_jtag_server");
|
||||||
|
fflush(stderr);
|
||||||
exit(1);
|
exit(1);
|
||||||
} else {
|
} else {
|
||||||
printf("Listening on port %d\n", ntohs(serv_addr.sin_port));
|
printf("Listening on port %d\n", ntohs(serv_addr.sin_port));
|
||||||
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Waiting for client connection...");
|
printf("Waiting for client connection...");
|
||||||
|
fflush(stdout);
|
||||||
connfd = accept(listenfd, (struct sockaddr*)NULL, NULL);
|
connfd = accept(listenfd, (struct sockaddr*)NULL, NULL);
|
||||||
printf("ok\n");
|
printf("ok\n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
flags = fcntl(listenfd, F_GETFL, 0);
|
flags = fcntl(listenfd, F_GETFL, 0);
|
||||||
fcntl(listenfd, F_SETFL, flags | O_NONBLOCK);
|
fcntl(listenfd, F_SETFL, flags | O_NONBLOCK);
|
||||||
|
Loading…
Reference in New Issue
Block a user