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

Unified Diff: sandbox/linux/services/thread_helpers.h

Issue 938223004: Linux sandbox: better APIs with /proc/ arguments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix invalid proc_fd_ usage. Created 5 years, 10 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 | « sandbox/linux/services/proc_util_unittest.cc ('k') | sandbox/linux/services/thread_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/services/thread_helpers.h
diff --git a/sandbox/linux/services/thread_helpers.h b/sandbox/linux/services/thread_helpers.h
index efc24589224e4989f2b1a4bc0cebc0ae4183c053..2915784f1713c9d005c3bc6dad2f283e69432b5c 100644
--- a/sandbox/linux/services/thread_helpers.h
+++ b/sandbox/linux/services/thread_helpers.h
@@ -14,24 +14,23 @@ namespace sandbox {
class SANDBOX_EXPORT ThreadHelpers {
public:
- // Check whether the current process is single threaded. |proc_self_tasks|
- // must be a file descriptor to /proc/self/task/ and remains owned by the
+ // Check whether the current process is single threaded. |proc_fd|
+ // must be a file descriptor to /proc/ and remains owned by the
// caller.
- static bool IsSingleThreaded(int proc_self_task);
+ static bool IsSingleThreaded(int proc_fd);
static bool IsSingleThreaded();
// Crash if the current process is not single threaded. This will wait
// on /proc to be updated. In the case where this doesn't crash, this will
// return promptly. In the case where this does crash, this will first wait
// for a few ms in Debug mode, a few seconds in Release mode.
- static void AssertSingleThreaded(int proc_self_task);
+ static void AssertSingleThreaded(int proc_fd);
static void AssertSingleThreaded();
// Stop |thread| and ensure that it does not have an entry in
// /proc/self/task/ from the point of view of the current thread. This is
// the way to stop threads before calling IsSingleThreaded().
- static bool StopThreadAndWatchProcFS(int proc_self_task,
- base::Thread* thread);
+ static bool StopThreadAndWatchProcFS(int proc_fd, base::Thread* thread);
static const char* GetAssertSingleThreadedErrorMessageForTests();
« no previous file with comments | « sandbox/linux/services/proc_util_unittest.cc ('k') | sandbox/linux/services/thread_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698