summaryrefslogtreecommitdiffstats
path: root/webkit/build/JavaScriptCore/pthread.h
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 18:27:38 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 18:27:38 +0000
commit7bcfbb4296c517f0c6f27c23065065a0b5568b59 (patch)
treed0e804359a9bd9e0f697751d624be5d53215b6b4 /webkit/build/JavaScriptCore/pthread.h
parentab5b9a361b7e6674c04071fa63dc2fce8491b196 (diff)
downloadchromium_src-7bcfbb4296c517f0c6f27c23065065a0b5568b59.zip
chromium_src-7bcfbb4296c517f0c6f27c23065065a0b5568b59.tar.gz
chromium_src-7bcfbb4296c517f0c6f27c23065065a0b5568b59.tar.bz2
Revert "Delete a bunch of deprecated and/or empty directores in src/webkit/."
This reverts commit r32340. TBR=japhet Review URL: http://codereview.chromium.org/402054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/build/JavaScriptCore/pthread.h')
-rw-r--r--webkit/build/JavaScriptCore/pthread.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/webkit/build/JavaScriptCore/pthread.h b/webkit/build/JavaScriptCore/pthread.h
new file mode 100644
index 0000000..3259fe8
--- /dev/null
+++ b/webkit/build/JavaScriptCore/pthread.h
@@ -0,0 +1,94 @@
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_WEBKIT_BUILD_JAVASCRIPTCORE_PTHREAD_H__
+#define CHROME_WEBKIT_BUILD_JAVASCRIPTCORE_PTHREAD_H__
+
+#include <errno.h>
+#include "wtf/Assertions.h"
+
+// Dummy implementations of various pthread APIs
+
+// ----------------------------------------------------------------------------
+// pthread_t
+
+typedef int pthread_t;
+
+inline pthread_t pthread_self() {
+ return 0;
+}
+inline int pthread_equal(pthread_t a, pthread_t b) {
+ return a == b;
+}
+inline int pthread_create(pthread_t* thread, void*, void* (*)(void*), void*) {
+ ASSERT_NOT_REACHED();
+ return EINVAL;
+}
+inline int pthread_join(pthread_t thread, void **) {
+ ASSERT_NOT_REACHED();
+ return EINVAL;
+}
+
+// ----------------------------------------------------------------------------
+// pthread_mutex_t
+
+typedef int pthread_mutex_t;
+
+inline int pthread_mutex_init(pthread_mutex_t* mutex, const void*) {
+ return 0;
+}
+inline int pthread_mutex_destroy(pthread_mutex_t* mutex) {
+ return 0;
+}
+inline int pthread_mutex_lock(pthread_mutex_t* mutex) {
+ return 0;
+}
+
+inline int pthread_mutex_trylock(pthread_mutex_t* mutex) {
+ return 0;
+}
+
+inline int pthread_mutex_unlock(pthread_mutex_t* mutex) {
+ return 0;
+}
+
+#define PTHREAD_MUTEX_INITIALIZER 0
+
+//
+// pthread_cond_t
+typedef int pthread_cond_t;
+
+inline int pthread_cond_init(pthread_cond_t* cond, const void*) {
+ return 0;
+}
+inline int pthread_cond_destroy(pthread_cond_t* cond) {
+ return 0;
+}
+
+inline int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *) {
+ return 0;
+}
+inline int pthread_cond_signal(pthread_cond_t *) {
+ return 0;
+}
+inline int pthread_cond_broadcast(pthread_cond_t *) {
+ return 0;
+}
+
+// ----------------------------------------------------------------------------
+// pthread_key_t
+
+typedef int pthread_key_t;
+
+void pthread_setspecific(pthread_key_t key, void* value) {
+ TlsSetValue(key, value);
+}
+
+void pthread_key_create(pthread_key_t* key, void* destructor) {
+ // TODO(mbelshe): hook up the per-thread destructor.
+ *key = TlsAlloc();
+}
+
+
+#endif // CHROME_WEBKIT_BUILD_JAVASCRIPTCORE_PTHREAD_H__