Fix mutex locking problems and some funkiness with %fs so that win32 codecs
work.
This commit is contained in:
parent
1995389b7f
commit
6e59d23cf4
3 changed files with 68 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.7 2003/10/02 10:11:49 mycroft Exp $
|
||||
$NetBSD: distinfo,v 1.8 2003/10/02 12:31:30 mycroft Exp $
|
||||
|
||||
SHA1 (xine-lib-1-rc0a.tar.gz) = ee41ba602179a9f02208a15e3dff36a1dfa00fac
|
||||
Size (xine-lib-1-rc0a.tar.gz) = 4211552 bytes
|
||||
|
@ -12,3 +12,5 @@ SHA1 (patch-ah) = 3f9b23c4a7994259056b73209a9e194db759f06d
|
|||
SHA1 (patch-ai) = f71e3cb57bf30cbf9653a469c040b6e3f717ba97
|
||||
SHA1 (patch-aj) = 54cf69b028d46327d46b5cc2a0ec457bd4a59b67
|
||||
SHA1 (patch-ak) = 5e791e17755e0b7515d81f80790d529992e827d6
|
||||
SHA1 (patch-al) = 4e995a84efcb8ae17a803f8f1cc6118506be09b0
|
||||
SHA1 (patch-am) = 0441dcd9faf0c0e7f07c8d0fc7a61fcce435af76
|
||||
|
|
40
graphics/xine-lib/patches/patch-al
Normal file
40
graphics/xine-lib/patches/patch-al
Normal file
|
@ -0,0 +1,40 @@
|
|||
$NetBSD: patch-al,v 1.1 2003/10/02 12:31:30 mycroft Exp $
|
||||
|
||||
--- src/libw32dll/wine/win32.c.orig 2003-10-02 12:25:52.000000000 +0000
|
||||
+++ src/libw32dll/wine/win32.c 2003-10-02 12:21:50.000000000 +0000
|
||||
@@ -440,9 +442,8 @@
|
||||
|
||||
alccnt--;
|
||||
|
||||
- if (last_alloc)
|
||||
- pthread_mutex_unlock(&memmut);
|
||||
- else
|
||||
+ pthread_mutex_unlock(&memmut);
|
||||
+ if (!last_alloc)
|
||||
pthread_mutex_destroy(&memmut);
|
||||
|
||||
//if (alccnt < 40000) printf("MY_RELEASE: %p\t%ld (%d)\n", header, header->size, alccnt);
|
||||
@@ -1349,11 +1350,10 @@
|
||||
#endif
|
||||
printf("wine/win32: Win32 Warning: Accessed uninitialized Critical Section (%p)!\n", c);
|
||||
}
|
||||
- if(cs->locked)
|
||||
+ if(cs->locked++)
|
||||
if(cs->id==pthread_self())
|
||||
return;
|
||||
pthread_mutex_lock(&(cs->mutex));
|
||||
- cs->locked=1;
|
||||
cs->id=pthread_self();
|
||||
return;
|
||||
}
|
||||
@@ -1371,8 +1371,8 @@
|
||||
printf("Win32 Warning: Leaving uninitialized Critical Section %p!!\n", c);
|
||||
return;
|
||||
}
|
||||
- cs->locked=0;
|
||||
- pthread_mutex_unlock(&(cs->mutex));
|
||||
+ if (!--cs->locked)
|
||||
+ pthread_mutex_unlock(&(cs->mutex));
|
||||
return;
|
||||
}
|
||||
static void WINAPI expDeleteCriticalSection(CRITICAL_SECTION *c)
|
25
graphics/xine-lib/patches/patch-am
Normal file
25
graphics/xine-lib/patches/patch-am
Normal file
|
@ -0,0 +1,25 @@
|
|||
$NetBSD: patch-am,v 1.1 2003/10/02 12:31:30 mycroft Exp $
|
||||
|
||||
--- src/libw32dll/wine/ldt_keeper.c.orig 2003-07-13 19:29:04.000000000 +0000
|
||||
+++ src/libw32dll/wine/ldt_keeper.c 2003-10-02 12:28:23.000000000 +0000
|
||||
@@ -147,18 +147,9 @@
|
||||
|
||||
void Check_FS_Segment(void)
|
||||
{
|
||||
- int fs;
|
||||
- __asm__ __volatile__(
|
||||
- "movw %%fs,%%ax; mov %%eax,%0" : "=r" (fs) :: "%eax"
|
||||
+ __asm__ __volatile__(
|
||||
+ "movl %0,%%eax; movw %%ax, %%fs" : : "i" (TEB_SEL) : "%eax"
|
||||
);
|
||||
- fs = fs & 0xffff;
|
||||
-
|
||||
- if( fs != TEB_SEL ) {
|
||||
- printf("ldt_keeper: FS segment is not set or has being lost!\n");
|
||||
- printf(" Please report this error to xine-devel@sourceforge.net\n");
|
||||
- printf(" Aborting....\n");
|
||||
- abort();
|
||||
- }
|
||||
}
|
||||
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
Loading…
Reference in a new issue