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

Function receive_1

examples/libc/mq.c:61–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61int * receive_1(void * mq)
62{
63 int i;
64 mqd_t mq1 = *(mqd_t *)mq;
65
66 printf("Enter into receive_1 \n");
67 for (i = 0; i< MAX_MSG; i++) {
68 if ( -1 == mq_receive(mq1, r_msg_ptr_1[i], MSG_SIZE, NULL) ) {
69 perror("mq_receive doesn't return success \n");
70 pthread_exit((void *)1);
71 }
72 printf("[%d] receive '%s' in thread receive_1. \n", i+1, r_msg_ptr_1[i]);
73 }
74 pthread_exit((void *)0);
75}
76int * receive_2(void * mq)
77{
78 int i;

Callers

nothing calls this directly

Calls 3

mq_receiveFunction · 0.85
pthread_exitFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected