Update contrib.
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 // Contains the source for fchdir
23 #include <sys/resource.h>
32 The function nice() increases or decreases the priority value by
33 adding the value 'incr' to the current priority.
34 It internally uses getpriority and setpriority to set the priority
36 It returns the new value of the priority, which shall be in the range
37 of -15 to 19. -1 is a legitimate return value, so the user has to check
38 the errno to be sure of failure.
40 EXPORT_C int nice(int incr)
47 if(((retGetPri = getpriority(PRIO_PROCESS, 0)) == -1) && (errno))
53 retSetPri = setpriority(PRIO_PROCESS, 0, retGetPri + incr);