nspr-hg: adapt patch, 3/4 have been included upstream.
This commit is contained in:
parent
48cac9b9bf
commit
314eba0fdf
2 changed files with 3 additions and 36 deletions
|
@ -14,4 +14,4 @@ SHA1 (patch-pr_src_md_unix_uxrng.c) = 85fad8b3607f5113fdd4697d251544418c025ab1
|
|||
SHA1 (patch-pr_src_misc_prnetdb.c) = b54360b1e1cfb8c5b08c55d4f99253bd192bc9de
|
||||
SHA1 (patch-pr_src_pthreads_ptio.c) = 8a40edcc64c7df3d068be51ea2e1b1fb1ed43cfc
|
||||
SHA1 (patch-pr_src_pthreads_ptsynch.c) = 4f385106b2846d0c10b5a8a362f43240aa64d299
|
||||
SHA1 (patch-pr_src_pthreads_ptthread.c) = 66376dead249ab941c4fcccd80b971d67f4e7525
|
||||
SHA1 (patch-pr_src_pthreads_ptthread.c) = fe762cc407ed18931b7ddf78c0a1f4f322395c56
|
||||
|
|
|
@ -5,20 +5,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=953413
|
|||
|
||||
Use appropriate thread naming function on FreeBSD, NetBSD, and OpenBSD.
|
||||
|
||||
--- pr/src/pthreads/ptthread.c.orig 2014-09-28 14:07:42.000000000 +0000
|
||||
--- pr/src/pthreads/ptthread.c.orig 2016-02-02 13:10:25.000000000 +0000
|
||||
+++ pr/src/pthreads/ptthread.c
|
||||
@@ -21,6 +21,10 @@
|
||||
#include <signal.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
+#if defined(OPENBSD) || defined(FREEBSD) || defined(DRAGONFLY)
|
||||
+#include <pthread_np.h>
|
||||
+#endif
|
||||
+
|
||||
#ifdef SYMBIAN
|
||||
/* In Open C sched_get_priority_min/max do not work properly, so we undefine
|
||||
* _POSIX_THREAD_PRIORITY_SCHEDULING here.
|
||||
@@ -1153,12 +1157,12 @@ PR_IMPLEMENT(void) PR_ProcessExit(PRIntn
|
||||
@@ -1159,12 +1159,12 @@ PR_IMPLEMENT(void) PR_ProcessExit(PRIntn
|
||||
_exit(status);
|
||||
}
|
||||
|
||||
|
@ -33,25 +22,3 @@ Use appropriate thread naming function on FreeBSD, NetBSD, and OpenBSD.
|
|||
#endif
|
||||
}
|
||||
|
||||
@@ -1731,7 +1735,7 @@ PR_IMPLEMENT(PRStatus) PR_SetCurrentThre
|
||||
{
|
||||
PRThread *thread;
|
||||
size_t nameLen;
|
||||
- int result;
|
||||
+ int result = 0;
|
||||
|
||||
if (!name) {
|
||||
PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
|
||||
@@ -1749,8 +1753,10 @@ PR_IMPLEMENT(PRStatus) PR_SetCurrentThre
|
||||
return PR_FAILURE;
|
||||
memcpy(thread->name, name, nameLen + 1);
|
||||
|
||||
-#if defined(OPENBSD) || defined(FREEBSD)
|
||||
- result = pthread_set_name_np(thread->id, name);
|
||||
+#if defined(OPENBSD) || defined(FREEBSD) || defined(DRAGONFLY)
|
||||
+ pthread_set_name_np(thread->id, name);
|
||||
+#elif defined(NETBSD)
|
||||
+ pthread_setname_np(thread->id, "%s", (void *)name);
|
||||
#else /* not BSD */
|
||||
/*
|
||||
* On OSX, pthread_setname_np is only available in 10.6 or later, so test
|
||||
|
|
Loading…
Reference in a new issue