[email protected] | 3d5617e | 2008-08-27 14:36:19 | [diff] [blame] | 1 | // 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 | |||||
12 | namespace process_util { | ||||
13 | |||||
14 | int GetCurrentProcId() { | ||||
15 | return getpid(); | ||||
16 | } | ||||
17 | |||||
[email protected] | 113ab13 | 2008-09-18 20:42:55 | [diff] [blame^] | 18 | ProcessHandle GetCurrentProcessHandle() { |
19 | return GetCurrentProcId(); | ||||
20 | } | ||||
21 | |||||
[email protected] | 3d5617e | 2008-08-27 14:36:19 | [diff] [blame] | 22 | int GetProcId(ProcessHandle process) { |
[email protected] | fadb8ea | 2008-08-27 15:36:37 | [diff] [blame] | 23 | return process; |
[email protected] | 3d5617e | 2008-08-27 14:36:19 | [diff] [blame] | 24 | } |
[email protected] | fadb8ea | 2008-08-27 15:36:37 | [diff] [blame] | 25 | |
[email protected] | 3d5617e | 2008-08-27 14:36:19 | [diff] [blame] | 26 | void 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 |