michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "ProcessUtils.h" michael@0: michael@0: #include michael@0: michael@0: #if !defined(OS_NETBSD) michael@0: #include michael@0: #endif michael@0: michael@0: namespace mozilla { michael@0: namespace ipc { michael@0: michael@0: void SetThisProcessName(const char *aName) michael@0: { michael@0: #if defined(OS_NETBSD) michael@0: pthread_setname_np(pthread_self(), "%s", (void *)aName); michael@0: #else michael@0: pthread_set_name_np(pthread_self(), aName); michael@0: #endif michael@0: } michael@0: michael@0: } // namespace ipc michael@0: } // namespace mozilla