Bumping manifests a=b2g-bump
[gecko.git] / xpcom / base / LinuxUtils.h
blobe82c15e08c840f04eac4ea874632c48c5a5b3091
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_LinuxUtils_h
8 #define mozilla_LinuxUtils_h
10 #if defined(XP_LINUX)
12 #include <unistd.h>
13 #include "nsString.h"
15 namespace mozilla {
17 class LinuxUtils
19 public:
20 // Obtain the name of a thread, omitting any numeric suffix added by a
21 // thread pool library (as in, e.g., "Binder_2" or "mozStorage #1").
22 // The empty string is returned on error.
24 // Note: if this is ever needed on kernels older than 2.6.33 (early 2010),
25 // it will have to parse /proc/<pid>/status instead, because
26 // /proc/<pid>/comm didn't exist before then.
27 static void GetThreadName(pid_t aTid, nsACString& aName);
32 #endif // XP_LINUX
34 #endif