blob: 96f05bb67a1f7ecac3eb067ddcdbfeefa3829b95 [file] [log] [blame]
[email protected]3d5617e2008-08-27 14:36:191// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "base/process_util.h"
6
7#include <sys/types.h>
8#include <unistd.h>
9
10#include "base/basictypes.h"
11
12namespace process_util {
13
14int GetCurrentProcId() {
15 return getpid();
16}
17
[email protected]113ab132008-09-18 20:42:5518ProcessHandle GetCurrentProcessHandle() {
19 return GetCurrentProcId();
20}
21
[email protected]3d5617e2008-08-27 14:36:1922int GetProcId(ProcessHandle process) {
[email protected]fadb8ea2008-08-27 15:36:3723 return process;
[email protected]3d5617e2008-08-27 14:36:1924}
[email protected]fadb8ea2008-08-27 15:36:3725
[email protected]3d5617e2008-08-27 14:36:1926void RaiseProcessToHighPriority() {
27 // On POSIX, we don't actually do anything here. We could try to nice() or
28 // setpriority() or sched_getscheduler, but these all require extra rights.
29}
30
31} // namespace process_util