mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32041 72102866-910b-0410-8b05-ffd578937521
19 lines
464 B
Objective-C
19 lines
464 B
Objective-C
/* Test whether Objective-C runtime uses pthreads and doesn't detach
|
|
* them properly. If the join attempt succeeds, the thread was created
|
|
* joinable (which it shouldn't be) and this program returns 0.
|
|
*/
|
|
|
|
#include "objc-common.g"
|
|
#include <pthread.h>
|
|
|
|
int
|
|
main()
|
|
{
|
|
id o = [NSObject new];
|
|
pthread_t tid;
|
|
void *value_ptr;
|
|
|
|
tid = (pthread_t)objc_thread_detach (@selector(hash), o, nil);
|
|
return pthread_join (tid, &value_ptr);
|
|
}
|
|
|