jtag_vpi: Attempt to more aggressively flush the simulator output as it is needed by other listeners
This commit is contained in:
parent
618468a06b
commit
0493372027
@ -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