| | |
| | | |
| | | |
| | | void *bus_handler(void *sockt) { |
| | | pthread_detach(pthread_self()); |
| | | // pthread_detach(pthread_self()); |
| | | |
| | | char action[512]; |
| | | while ( true) { |
| | |
| | | printf("start bus failed\n"); |
| | | exit(1); |
| | | } |
| | | |
| | | if (pthread_join(tid, NULL) != 0) { |
| | | perror(" pthread_join"); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | sprintf(sendbuf, "RECEIVED PORT %d NAME %s", remote_port, recvbuf); |
| | | net_mod_socket_sendto(client, sendbuf, strlen(sendbuf) + 1, remote_port); |
| | | free(recvbuf); |
| | | sleep(1000); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | void test_net_sendandrecv_threads(char *nodelist) { |
| | | |
| | | int status, i = 0, processors = 4; |
| | | int status, i = 0, processors = 1; |
| | | void *res[processors]; |
| | | // Targ *targs = (Targ *)calloc(processors, sizeof(Targ)); |
| | | Targ targs[processors]; |