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

Side by Side Diff: Source/wtf/ThreadIdentifierDataPthreads.cpp

Issue 351683007: Remove the OS() guard from ThreadIdentifierDataPthreads.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months 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
« no previous file with comments | « no previous file | no next file » | 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) 2009, 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 19 matching lines...) Expand all
30 30
31 #include "config.h" 31 #include "config.h"
32 32
33 #if USE(PTHREADS) 33 #if USE(PTHREADS)
34 34
35 #include "wtf/ThreadIdentifierDataPthreads.h" 35 #include "wtf/ThreadIdentifierDataPthreads.h"
36 36
37 #include "wtf/Assertions.h" 37 #include "wtf/Assertions.h"
38 #include "wtf/WTF.h" 38 #include "wtf/WTF.h"
39 39
40 #if OS(ANDROID) 40 #include <limits.h>
41 // PTHREAD_KEYS_MAX is not defined in bionic, so explicitly define it here. 41
42 // PTHREAD_KEYS_MAX might be not defined (e.g. in certain bionic versions), so e xplicitly define it here.
42 #ifndef PTHREAD_KEYS_MAX 43 #ifndef PTHREAD_KEYS_MAX
43 #define PTHREAD_KEYS_MAX 1024 44 #define PTHREAD_KEYS_MAX 1024
44 #endif // PTHREAD_KEYS_MAX 45 #endif // PTHREAD_KEYS_MAX
45 #else
46 #include <limits.h>
47 #endif
48 46
49 namespace WTF { 47 namespace WTF {
50 48
51 pthread_key_t ThreadIdentifierData::m_key = PTHREAD_KEYS_MAX; 49 pthread_key_t ThreadIdentifierData::m_key = PTHREAD_KEYS_MAX;
52 50
53 void threadDidExit(ThreadIdentifier); 51 void threadDidExit(ThreadIdentifier);
54 52
55 ThreadIdentifierData::~ThreadIdentifierData() 53 ThreadIdentifierData::~ThreadIdentifierData()
56 { 54 {
57 threadDidExit(m_identifier); 55 threadDidExit(m_identifier);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 89 }
92 90
93 threadIdentifierData->m_isDestroyedOnce = true; 91 threadIdentifierData->m_isDestroyedOnce = true;
94 // Re-setting the value for key causes another destruct() call after all oth er thread-specific destructors were called. 92 // Re-setting the value for key causes another destruct() call after all oth er thread-specific destructors were called.
95 pthread_setspecific(m_key, threadIdentifierData); 93 pthread_setspecific(m_key, threadIdentifierData);
96 } 94 }
97 95
98 } // namespace WTF 96 } // namespace WTF
99 97
100 #endif // USE(PTHREADS) 98 #endif // USE(PTHREADS)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698