12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- #include "test.h"
- static void * func(void * arg)
- {
- pte_osThreadSleep(2000);
- return 0;
- }
- int pthread_test_equal1()
- {
- pthread_t t1, t2;
- assert(pthread_create(&t1, NULL, func, (void *) 1) == 0);
- assert(pthread_create(&t2, NULL, func, (void *) 2) == 0);
- assert(pthread_equal(t1, t2) == 0);
- assert(pthread_equal(t1,t1) != 0);
- assert(pthread_join(t1,NULL) == 0);
- assert(pthread_join(t2,NULL) == 0);
-
- return 0;
- }
|