mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 741272 - Implement raise() using pthread_kill() so the signal will be sent to the the caller thread instead of a random thread in the thread group. r=blassey,khuey
This commit is contained in:
parent
3bc848ff14
commit
01de3d9145
@ -7230,7 +7230,7 @@ if test "$OS_TARGET" = Android; then
|
||||
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=dlopen,--wrap=dlclose,--wrap=dlerror,--wrap=dlsym,--wrap=dladdr"
|
||||
fi
|
||||
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=getaddrinfo,--wrap=freeaddrinfo,--wrap=gai_strerror"
|
||||
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=fork,--wrap=pthread_atfork"
|
||||
WRAP_LDFLAGS="${WRAP_LDFLAGS} -Wl,--wrap=fork,--wrap=pthread_atfork,--wrap=raise"
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
|
@ -49,6 +49,7 @@
|
||||
#include <sys/mman.h>
|
||||
#include <sys/limits.h>
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -1082,3 +1083,10 @@ __wrap_fork(void)
|
||||
}
|
||||
return pid;
|
||||
}
|
||||
|
||||
extern "C" NS_EXPORT int
|
||||
__wrap_raise(int sig)
|
||||
{
|
||||
return pthread_kill(pthread_self(), sig);
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <vector>
|
||||
|
||||
#define NS_EXPORT __attribute__ ((visibility("default")))
|
||||
@ -51,3 +52,10 @@ __wrap_fork(void)
|
||||
}
|
||||
return pid;
|
||||
}
|
||||
|
||||
extern "C" NS_EXPORT int
|
||||
__wrap_raise(int sig)
|
||||
{
|
||||
return pthread_kill(pthread_self(), sig);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user