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

Function print_it

examples/libc/ex3.c:63–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 when the threads are cancelled */
62
63void print_it(void *arg)
64{
65 int *try = (int *) arg;
66 pthread_t tid;
67
68 /* Get the calling thread's ID */
69 tid = pthread_self();
70
71 /* Print where the thread was in its search when it was cancelled */
72 printf("Thread %lx was canceled on its %d try.\n", tid, *try);
73}
74
75/* This is the search routine that is executed in each thread */
76

Callers

nothing calls this directly

Calls 2

pthread_selfFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected