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

Function send_1

examples/libc/mq.c:28–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26pthread_t send1, send2, rev1, rev2;
27
28int * 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
45int * send_2(void * mq)
46{

Callers

nothing calls this directly

Calls 3

mq_sendFunction · 0.85
pthread_exitFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected