diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-29 09:07:42 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-29 09:07:42 +0200 |
commit | aff03b0a67c41cf7af5df9c9eef715a8b27a2667 (patch) | |
tree | aa2909ae4718f81c83c8cfb68c1f5a23485b3173 /nsprpub/pr/tests/attach.c | |
parent | bdb4ff581677ad1cd411b55a68c87534f9a64882 (diff) | |
parent | 11caf6ecb3cb8c84d2355a6c6e9580a290147e92 (diff) | |
download | UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.tar UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.tar.gz UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.tar.lz UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.tar.xz UXP-aff03b0a67c41cf7af5df9c9eef715a8b27a2667.zip |
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into js_dom_performance-resource-timing_1
Diffstat (limited to 'nsprpub/pr/tests/attach.c')
-rw-r--r-- | nsprpub/pr/tests/attach.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nsprpub/pr/tests/attach.c b/nsprpub/pr/tests/attach.c index a1493b8ec..a5daf9d96 100644 --- a/nsprpub/pr/tests/attach.c +++ b/nsprpub/pr/tests/attach.c @@ -111,6 +111,16 @@ static int32 threadStartFunc(void *arg) static void * threadStartFunc(void *arg) #endif { +#ifdef _PR_DCETHREADS + { + int rv; + pthread_t self = pthread_self(); + rv = pthread_detach(&self); + if (debug_mode) PR_ASSERT(0 == rv); + else if (0 != rv) failed_already=1; + } +#endif + Measure(AttachDetach, "Attach/Detach"); #ifndef IRIX @@ -196,12 +206,14 @@ int main(int argc, char **argv) goto exit_now; } +#ifndef _PR_DCETHREADS rv = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); if (debug_mode) PR_ASSERT(0 == rv); else if (0 != rv) { failed_already=1; goto exit_now; } +#endif /* !_PR_DCETHREADS */ rv = _PT_PTHREAD_CREATE(&threadID, attr, threadStartFunc, NULL); if (rv != 0) { fprintf(stderr, "thread creation failed: error code %d\n", rv); |