MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / receive_2

Function receive_2

examples/libc/mq.c:76–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74 pthread_exit((void *)0);
75}
76int * receive_2(void * mq)
77{
78 int i;
79 mqd_t mq2 = *(mqd_t *)mq;
80
81 printf("Enter into receive_2 \n");
82 for (i = 0; i< MAX_MSG; i++) {
83 if ( -1 == mq_receive(mq2, r_msg_ptr_2[i], MSG_SIZE, NULL) ) {
84 perror("mq_receive doesn't return success \n");
85 pthread_exit((void *)1);
86 }
87 printf("[%d] receive '%s' in thread receive_2. \n", i+1, r_msg_ptr_2[i]);
88 }
89 pthread_exit((void *)0);
90}
91
92int libc_mq()
93{

Callers

nothing calls this directly

Calls 3

mq_receiveFunction · 0.85
pthread_exitFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected