Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: third_party/harfbuzz-ng/src/hb-mutex-private.hh

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright © 2007 Chris Wilson 2 * Copyright © 2007 Chris Wilson
3 * Copyright © 2009,2010 Red Hat, Inc. 3 * Copyright © 2009,2010 Red Hat, Inc.
4 * Copyright © 2011,2012 Google, Inc. 4 * Copyright © 2011,2012 Google, Inc.
5 * 5 *
6 * This is part of HarfBuzz, a text shaping library. 6 * This is part of HarfBuzz, a text shaping library.
7 * 7 *
8 * Permission is hereby granted, without written agreement and without 8 * Permission is hereby granted, without written agreement and without
9 * license or royalty fees, to use, copy, modify, and distribute this 9 * license or royalty fees, to use, copy, modify, and distribute this
10 * software and its documentation for any purpose, provided that the 10 * software and its documentation for any purpose, provided that the
(...skipping 29 matching lines...) Expand all
40 /* We need external help for these */ 40 /* We need external help for these */
41 41
42 #if 0 42 #if 0
43 43
44 44
45 #elif !defined(HB_NO_MT) && (defined(_WIN32) || defined(__CYGWIN__)) 45 #elif !defined(HB_NO_MT) && (defined(_WIN32) || defined(__CYGWIN__))
46 46
47 #include <windows.h> 47 #include <windows.h>
48 typedef CRITICAL_SECTION hb_mutex_impl_t; 48 typedef CRITICAL_SECTION hb_mutex_impl_t;
49 #define HB_MUTEX_IMPL_INIT {0} 49 #define HB_MUTEX_IMPL_INIT {0}
50 #if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAM ILY==WINAPI_FAMILY_PHONE_APP)
51 #define hb_mutex_impl_init(M) InitializeCriticalSectionEx (M, 0, 0)
52 #else
50 #define hb_mutex_impl_init(M) InitializeCriticalSection (M) 53 #define hb_mutex_impl_init(M) InitializeCriticalSection (M)
54 #endif
51 #define hb_mutex_impl_lock(M) EnterCriticalSection (M) 55 #define hb_mutex_impl_lock(M) EnterCriticalSection (M)
52 #define hb_mutex_impl_unlock(M) LeaveCriticalSection (M) 56 #define hb_mutex_impl_unlock(M) LeaveCriticalSection (M)
53 #define hb_mutex_impl_finish(M) DeleteCriticalSection (M) 57 #define hb_mutex_impl_finish(M) DeleteCriticalSection (M)
54 58
55 59
56 #elif !defined(HB_NO_MT) && (defined(HAVE_PTHREAD) || defined(__APPLE__)) 60 #elif !defined(HB_NO_MT) && (defined(HAVE_PTHREAD) || defined(__APPLE__))
57 61
58 #include <pthread.h> 62 #include <pthread.h>
59 typedef pthread_mutex_t hb_mutex_impl_t; 63 typedef pthread_mutex_t hb_mutex_impl_t;
60 #define HB_MUTEX_IMPL_INIT PTHREAD_MUTEX_INITIALIZER 64 #define HB_MUTEX_IMPL_INIT PTHREAD_MUTEX_INITIALIZER
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 hb_mutex_impl_t m; 124 hb_mutex_impl_t m;
121 125
122 inline void init (void) { hb_mutex_impl_init (&m); } 126 inline void init (void) { hb_mutex_impl_init (&m); }
123 inline void lock (void) { hb_mutex_impl_lock (&m); } 127 inline void lock (void) { hb_mutex_impl_lock (&m); }
124 inline void unlock (void) { hb_mutex_impl_unlock (&m); } 128 inline void unlock (void) { hb_mutex_impl_unlock (&m); }
125 inline void finish (void) { hb_mutex_impl_finish (&m); } 129 inline void finish (void) { hb_mutex_impl_finish (&m); }
126 }; 130 };
127 131
128 132
129 #endif /* HB_MUTEX_PRIVATE_HH */ 133 #endif /* HB_MUTEX_PRIVATE_HH */
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-icu.cc ('k') | third_party/harfbuzz-ng/src/hb-open-type-private.hh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698