Bug 10175 - cairo_font_face_mutex missing from cairo-win32-surface.c
Summary: cairo_font_face_mutex missing from cairo-win32-surface.c
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: win32 backend (show other bugs)
Version: 1.3.16
Hardware: All All
: medium blocker
Assignee: Owen Taylor
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-03 21:59 UTC by Bob Jamison
Modified: 2007-03-03 23:17 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Bob Jamison 2007-03-03 21:59:14 UTC
cairo_font_face_mutex was inadvertently left out of cairo-win32-surface.c .  The attached patch adds it, and adds calls to InitializeCriticalSection() and DeleteCriticalSection().
Comment 1 Bob Jamison 2007-03-03 22:13:41 UTC
Tried several times to upload this trivial patch, but Bugzilla keeps telling me that the file is empty.  Bugzilla broken?  Until I get it to work, here it is:
====================================================================
--- src/cairo-win32-surface.c.orig	2007-03-02 22:14:56.000000000 -0600
+++ src/cairo-win32-surface.c	2007-03-03 17:54:49.009500000 -0600
@@ -1895,6 +1895,7 @@
  */
 #if !defined(HAVE_PTHREAD_H) 
 
+CRITICAL_SECTION cairo_font_face_mutex;
 CRITICAL_SECTION cairo_toy_font_face_hash_table_mutex;
 CRITICAL_SECTION cairo_scaled_font_map_mutex;
 CRITICAL_SECTION cairo_ft_unscaled_font_map_mutex;
@@ -1908,6 +1909,7 @@
 
     /* every 'mutex' from CAIRO_MUTEX_DECALRE needs to be initialized here */
     InitializeCriticalSection (&cairo_toy_font_face_hash_table_mutex);
+    InitializeCriticalSection (&cairo_font_face_mutex);
     InitializeCriticalSection (&cairo_scaled_font_map_mutex);
     InitializeCriticalSection (&cairo_ft_unscaled_font_map_mutex);
 
@@ -1927,6 +1929,7 @@
     break;
   case DLL_PROCESS_DETACH:
     DeleteCriticalSection (&cairo_toy_font_face_hash_table_mutex);
+    DeleteCriticalSection (&cairo_font_face_mutex);
     DeleteCriticalSection (&cairo_scaled_font_map_mutex);
     DeleteCriticalSection (&cairo_ft_unscaled_font_map_mutex);
     break;

Comment 2 Carl Worth 2007-03-03 22:53:25 UTC
I've now pushed out a fix for this: 

http://gitweb.freedesktop.org/?p=cairo;a=commitdiff;h=325e75239098e640ed05ade39ec2b9f74ae30d3d

(The patch was one from Hans Breuer on the list, but it seemed functionally identical.)

Thanks,

-Carl
Comment 3 Behdad Esfahbod 2007-03-03 23:17:03 UTC
actually cairo_toy_font_face_hash_table_mutex should be removed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.