mirror of https://github.com/mpv-player/mpv
Fix pthread & lrmi segfault issue. ("Oleg I. Vdovikin" <vdovikin@jscc.ru>)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11435 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
dadd9e6b75
commit
95e49827fd
|
@ -11,6 +11,7 @@ This software has NO WARRANTY. Use it at your own risk.
|
||||||
Original location: http://cvs.debian.org/lrmi/
|
Original location: http://cvs.debian.org/lrmi/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <signal.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/io.h>
|
#include <sys/io.h>
|
||||||
|
@ -789,10 +790,17 @@ static int
|
||||||
run_vm86(void)
|
run_vm86(void)
|
||||||
{
|
{
|
||||||
unsigned int vret;
|
unsigned int vret;
|
||||||
|
sigset_t allsigs, cursigs;
|
||||||
|
unsigned long oldgs;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
sigfillset(&allsigs);
|
||||||
|
sigprocmask(SIG_SETMASK, &allsigs, &cursigs);
|
||||||
|
asm volatile ("movl %%gs, %0" : "=g" (oldgs));
|
||||||
vret = lrmi_vm86(&context.vm);
|
vret = lrmi_vm86(&context.vm);
|
||||||
|
asm volatile ("movl %0, %%gs" :: "g" (oldgs));
|
||||||
|
sigprocmask(SIG_SETMASK, &cursigs, NULL);
|
||||||
|
|
||||||
if (VM86_TYPE(vret) == VM86_INTx)
|
if (VM86_TYPE(vret) == VM86_INTx)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue