| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Jian Li <jianli@chromium.org> | 3 * Copyright (C) 2009 Jian Li <jianli@chromium.org> |
| 4 * Copyright (C) 2012 Patrick Gansterer <paroga@paroga.com> | 4 * Copyright (C) 2012 Patrick Gansterer <paroga@paroga.com> |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 * repeatedly if there is still non-NULL value associated with the function. | 35 * repeatedly if there is still non-NULL value associated with the function. |
| 36 * @ In Windows native implementation, the destructor function will be called | 36 * @ In Windows native implementation, the destructor function will be called |
| 37 * only once. | 37 * only once. |
| 38 * This semantic discrepancy does not impose any problem because nowhere in | 38 * This semantic discrepancy does not impose any problem because nowhere in |
| 39 * WebKit the repeated call bahavior is utilized. | 39 * WebKit the repeated call bahavior is utilized. |
| 40 */ | 40 */ |
| 41 | 41 |
| 42 #ifndef WTF_ThreadSpecific_h | 42 #ifndef WTF_ThreadSpecific_h |
| 43 #define WTF_ThreadSpecific_h | 43 #define WTF_ThreadSpecific_h |
| 44 | 44 |
| 45 #include "wtf/Noncopyable.h" | 45 #include "sky/engine/wtf/Noncopyable.h" |
| 46 #include "wtf/StdLibExtras.h" | 46 #include "sky/engine/wtf/StdLibExtras.h" |
| 47 #include "wtf/WTF.h" | 47 #include "sky/engine/wtf/WTF.h" |
| 48 #include "wtf/WTFExport.h" | 48 #include "sky/engine/wtf/WTFExport.h" |
| 49 | 49 |
| 50 #if USE(PTHREADS) | 50 #if USE(PTHREADS) |
| 51 #include <pthread.h> | 51 #include <pthread.h> |
| 52 #endif | 52 #endif |
| 53 | 53 |
| 54 namespace WTF { | 54 namespace WTF { |
| 55 | 55 |
| 56 template<typename T> class ThreadSpecific { | 56 template<typename T> class ThreadSpecific { |
| 57 WTF_MAKE_NONCOPYABLE(ThreadSpecific); | 57 WTF_MAKE_NONCOPYABLE(ThreadSpecific); |
| 58 public: | 58 public: |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 inline T& ThreadSpecific<T>::operator*() | 198 inline T& ThreadSpecific<T>::operator*() |
| 199 { | 199 { |
| 200 return *operator T*(); | 200 return *operator T*(); |
| 201 } | 201 } |
| 202 | 202 |
| 203 } // namespace WTF | 203 } // namespace WTF |
| 204 | 204 |
| 205 using WTF::ThreadSpecific; | 205 using WTF::ThreadSpecific; |
| 206 | 206 |
| 207 #endif // WTF_ThreadSpecific_h | 207 #endif // WTF_ThreadSpecific_h |
| OLD | NEW |