| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_WEBKIT_BUILD_JAVASCRIPTCORE_PTHREAD_H__ | 5 #ifndef CHROME_WEBKIT_BUILD_JAVASCRIPTCORE_PTHREAD_H__ |
| 6 #define CHROME_WEBKIT_BUILD_JAVASCRIPTCORE_PTHREAD_H__ | 6 #define CHROME_WEBKIT_BUILD_JAVASCRIPTCORE_PTHREAD_H__ |
| 7 | 7 |
| 8 #include <errno.h> | 8 #include <errno.h> |
| 9 #include "wtf/Assertions.h" | 9 #include "wtf/Assertions.h" |
| 10 | 10 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 inline int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *) { | 69 inline int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *) { |
| 70 return 0; | 70 return 0; |
| 71 } | 71 } |
| 72 inline int pthread_cond_signal(pthread_cond_t *) { | 72 inline int pthread_cond_signal(pthread_cond_t *) { |
| 73 return 0; | 73 return 0; |
| 74 } | 74 } |
| 75 inline int pthread_cond_broadcast(pthread_cond_t *) { | 75 inline int pthread_cond_broadcast(pthread_cond_t *) { |
| 76 return 0; | 76 return 0; |
| 77 } | 77 } |
| 78 | 78 |
| 79 // ---------------------------------------------------------------------------- |
| 80 // pthread_key_t |
| 81 |
| 82 typedef int pthread_key_t; |
| 83 |
| 84 void pthread_setspecific(pthread_key_t key, void* value) { |
| 85 TlsSetValue(key, value); |
| 86 } |
| 87 |
| 88 void pthread_key_create(pthread_key_t* key, void* destructor) { |
| 89 // TODO(mbelshe): hook up the per-thread destructor. |
| 90 *key = TlsAlloc(); |
| 91 } |
| 92 |
| 79 | 93 |
| 80 #endif // CHROME_WEBKIT_BUILD_JAVASCRIPTCORE_PTHREAD_H__ | 94 #endif // CHROME_WEBKIT_BUILD_JAVASCRIPTCORE_PTHREAD_H__ |
| OLD | NEW |