| 26 | pthread_t send1, send2, rev1, rev2; |
| 27 | |
| 28 | int * send_1(void * mq) |
| 29 | { |
| 30 | int i; |
| 31 | mqd_t mq1 = *(mqd_t *)mq; |
| 32 | |
| 33 | printf("Enter into send_1 \n"); |
| 34 | for (i = 0; i < MAX_MSG; i++ ) { |
| 35 | if ( -1 == mq_send(mq1, s_msg_ptr[i], MSG_SIZE, i)) { |
| 36 | perror("mq_send doesn't return success \n"); |
| 37 | pthread_exit((void *)1); |
| 38 | } |
| 39 | printf("[%d] send '%s' in thread send_1. \n", i+1, s_msg_ptr[i]); |
| 40 | } |
| 41 | pthread_exit((void *)0); |
| 42 | |
| 43 | } |
| 44 | |
| 45 | int * send_2(void * mq) |
| 46 | { |
nothing calls this directly
no test coverage detected