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

Function send_2

examples/libc/mq.c:45–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45int * send_2(void * mq)
46{
47 int i;
48 mqd_t mq2 = *(mqd_t *)mq;
49
50 printf("Enter into send_2 \n");
51 for (i = 0; i < MAX_MSG; i++ ) {
52 if ( -1 == mq_send(mq2, s_msg_ptr[i], MSG_SIZE, i)) {
53 perror("mq_send doesn't return success \n");
54 pthread_exit((void *)1);
55 }
56 printf("[%d] send '%s' in thread send_2. \n", i+1, s_msg_ptr[i]);
57 }
58 pthread_exit((void *)0);
59}
60
61int * receive_1(void * mq)
62{

Callers

nothing calls this directly

Calls 3

mq_sendFunction · 0.85
pthread_exitFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected