Mercurial > mplayer.hg
comparison osdep/lrmi.c @ 11519:830c5c1800bc
Save fs before calling vm86, this might eleminate bugs (if there were any) in cooperation of using vesa with win32 dlls. Patch by Peter Kosinar <goober@ksp.sk>
author | alex |
---|---|
date | Mon, 24 Nov 2003 22:39:03 +0000 |
parents | 22f8732b5d97 |
children | 7a6d3ca86409 |
comparison
equal
deleted
inserted
replaced
11518:49de4a85957f | 11519:830c5c1800bc |
---|---|
792 static int | 792 static int |
793 run_vm86(void) | 793 run_vm86(void) |
794 { | 794 { |
795 unsigned int vret; | 795 unsigned int vret; |
796 sigset_t allsigs, cursigs; | 796 sigset_t allsigs, cursigs; |
797 unsigned long oldgs; | 797 unsigned long oldgs, oldfs; |
798 | 798 |
799 while (1) | 799 while (1) |
800 { | 800 { |
801 sigfillset(&allsigs); | 801 sigfillset(&allsigs); |
802 sigprocmask(SIG_SETMASK, &allsigs, &cursigs); | 802 sigprocmask(SIG_SETMASK, &allsigs, &cursigs); |
803 asm volatile ("movl %%gs, %0" : "=g" (oldgs)); | 803 asm volatile ("movl %%gs, %0" : "=g" (oldgs)); |
804 asm volatile ("movl %%fs, %0" : "=g" (oldfs)); | |
804 vret = lrmi_vm86(&context.vm); | 805 vret = lrmi_vm86(&context.vm); |
806 asm volatile ("movl %0, %%fs" :: "g" (oldfs)); | |
805 asm volatile ("movl %0, %%gs" :: "g" (oldgs)); | 807 asm volatile ("movl %0, %%gs" :: "g" (oldgs)); |
806 sigprocmask(SIG_SETMASK, &cursigs, NULL); | 808 sigprocmask(SIG_SETMASK, &cursigs, NULL); |
807 | 809 |
808 if (VM86_TYPE(vret) == VM86_INTx) | 810 if (VM86_TYPE(vret) == VM86_INTx) |
809 { | 811 { |