[Mplayer-cvslog] CVS: main/osdep lrmi.c,1.2,1.3

Tobias Diedrich CVS ranma at mplayerhq.hu
Tue Nov 11 11:39:59 CET 2003


Update of /cvsroot/mplayer/main/osdep
In directory mail:/var/tmp.root/cvs-serv21872

Modified Files:
	lrmi.c 
Log Message:
Fix pthread & lrmi segfault issue. ("Oleg I. Vdovikin" <vdovikin at jscc.ru>)


Index: lrmi.c
===================================================================
RCS file: /cvsroot/mplayer/main/osdep/lrmi.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- lrmi.c	12 Sep 2003 15:54:28 -0000	1.2
+++ lrmi.c	11 Nov 2003 10:39:36 -0000	1.3
@@ -11,6 +11,7 @@
 Original location: http://cvs.debian.org/lrmi/
 */
 
+#include <signal.h>
 #include <stdio.h>
 #include <string.h>
 #include <sys/io.h>
@@ -789,10 +790,17 @@
 run_vm86(void)
 	{
 	unsigned int vret;
+	sigset_t allsigs, cursigs;
+	unsigned long oldgs;
 
 	while (1)
 		{
+		sigfillset(&allsigs);
+	        sigprocmask(SIG_SETMASK, &allsigs, &cursigs);
+		asm volatile ("movl %%gs, %0" : "=g" (oldgs));
 		vret = lrmi_vm86(&context.vm);
+		asm volatile ("movl %0, %%gs" :: "g" (oldgs));
+		sigprocmask(SIG_SETMASK, &cursigs, NULL);
 
 		if (VM86_TYPE(vret) == VM86_INTx)
 			{



More information about the MPlayer-cvslog mailing list