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

Side by Side Diff: source/libvpx/vpx_ports/vpx_once.h

Issue 111463005: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vpx/vpx_external_frame_buffer.h ('k') | source/libvpx/vpx_ports/x86.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2011 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10
11 #ifndef VPX_ONCE_H
12 #define VPX_ONCE_H
13
10 #include "vpx_config.h" 14 #include "vpx_config.h"
11 15
12 #if CONFIG_MULTITHREAD && defined(_WIN32) 16 #if CONFIG_MULTITHREAD && defined(_WIN32)
13 #include <windows.h> 17 #include <windows.h>
14 #include <stdlib.h> 18 #include <stdlib.h>
15 static void once(void (*func)(void)) 19 static void once(void (*func)(void))
16 { 20 {
17 static CRITICAL_SECTION *lock; 21 static CRITICAL_SECTION *lock;
18 static LONG waiters; 22 static LONG waiters;
19 static int done; 23 static int done;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 { 92 {
89 static int done; 93 static int done;
90 94
91 if(!done) 95 if(!done)
92 { 96 {
93 func(); 97 func();
94 done = 1; 98 done = 1;
95 } 99 }
96 } 100 }
97 #endif 101 #endif
102
103 #endif
OLDNEW
« no previous file with comments | « source/libvpx/vpx/vpx_external_frame_buffer.h ('k') | source/libvpx/vpx_ports/x86.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698