1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- #include <stdio.h>
- #include <stdlib.h>
- #include "test.h"
- static pthread_t me;
- static void *
- entry(void * arg)
- {
- me = pthread_self();
- return arg;
- }
- int pthread_test_self2()
- {
- pthread_t t;
- assert(pthread_create(&t, NULL, entry, NULL) == 0);
- pte_osThreadSleep(100);
- assert(pthread_equal(t, me) != 0);
- assert(pthread_join(t,NULL) == 0);
-
- return 0;
- }
|