diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-05-07 20:23:27 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-05-07 20:23:27 +0000 |
commit | 48ca7e37ef684dea5271b8d779c1ccc66b9bf275 (patch) | |
tree | 07a773345b52afd038bc3f6ae51aeafb2358919c /src/core/SkTLS.h | |
parent | 82d447d4f193f10a5ea77a0bcb5737fc35fb340d (diff) |
impl SkTLS for windows, refactoring to share code with pthread impl
git-svn-id: http://skia.googlecode.com/svn/trunk@3859 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkTLS.h')
-rw-r--r-- | src/core/SkTLS.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/core/SkTLS.h b/src/core/SkTLS.h index 7368d72854..0ce39247aa 100644 --- a/src/core/SkTLS.h +++ b/src/core/SkTLS.h @@ -44,6 +44,29 @@ public: * data is found, do nothing. */ static void Delete(CreateProc); + +private: + // Our implementation requires only 1 TLS slot, as we manage multiple values + // ourselves in a list, with the platform specific value as our head. + + /** + * implemented by the platform, to return the value of our (one) slot per-thread + */ + static void* PlatformGetSpecific(); + + /** + * implemented by the platform, to set the value for our (one) slot per-thread + */ + static void PlatformSetSpecific(void*); + +public: + /** + * Will delete our internal list. To be called by the platform if/when its + * TLS slot is deleted (often at thread shutdown). + * + * Public *only* for the platform's use, not to be called by a client. + */ + static void Destructor(void* ptr); }; #endif |