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

Unified Diff: base/stats_table.h

Issue 8751: Port last remaining test case in base/stats_table_unittest.cc, and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/stats_table.cc » ('j') | base/stats_table.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/stats_table.h
===================================================================
--- base/stats_table.h (revision 4223)
+++ base/stats_table.h (working copy)
@@ -76,11 +76,6 @@
// returns 0.
int RegisterThread(const std::wstring& name);
- // Returns the space occupied by a thread in the table. Generally used
- // if a thread terminates but the process continues. This function
- // does not zero out the thread's counters.
- void UnregisterThread();
-
// Returns the number of threads currently registered. This is really not
// useful except for diagnostics and debugging.
int CountThreadsRegistered() const;
@@ -137,6 +132,19 @@
static int* FindLocation(const wchar_t *name);
private:
+ // Returns the space occupied by a thread in the table. Generally used
+ // if a thread terminates but the process continues. This function
+ // does not zero out the thread's counters.
+ void UnregisterThread();
+
+ // This variant expects the tls data to be passed in, so it is safe to
+ // call from inside a posix tls destructor (see doc for pthread_key_create).
+ void UnregisterThread(StatsTableTLSData *tls_data);
Evan Martin 2008/10/31 19:17:13 nit: star on the left.
+
+ // The SlotReturnFunction is called at thread exit for each thread
+ // which used the StatsTable.
+ static void SlotReturnFunction(void* data);
+
// Locates a free slot in the table. Returns a number > 0 on success,
// or 0 on failure. The caller must hold the shared_memory lock when
// calling this function.
« no previous file with comments | « no previous file | base/stats_table.cc » ('j') | base/stats_table.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698