Update contrib.
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
20 #include <sys/types.h>
26 #include "sysusrinclude.h"
29 #define MASK_RWUSR 0066 // Read and write permission for user alone
32 // Calling Process GID observer and modifier
34 EXPORT_C int setgid( gid_t gid )
41 EXPORT_C gid_t getegid( void )
48 EXPORT_C int setegid( gid_t gid )
54 EXPORT_C int setregid( gid_t rgid, gid_t egid )
56 return _setregid(rgid, egid);
60 // Calling Process UID observer and modifier
62 EXPORT_C gid_t getgid( void )
67 EXPORT_C uid_t getuid( void )
72 EXPORT_C int setuid( uid_t uid )
78 EXPORT_C uid_t geteuid( void )
83 EXPORT_C int seteuid( uid_t uid )
89 EXPORT_C int setreuid( uid_t ruid, uid_t euid )
91 return _setreuid(ruid, euid);
95 // Process group ID observer and modifier
97 EXPORT_C pid_t getpgid( pid_t pid )
102 EXPORT_C pid_t setpgid( pid_t pid, pid_t pgid )
104 return _setpgid(pid, pgid);
108 EXPORT_C pid_t getpgrp( void )
115 EXPORT_C int setpgrp( pid_t _pid, pid_t _pgrp )
117 return _setpgrp(_pid,_pgrp);
121 // Supplementary Group ID observer
123 EXPORT_C int getgroups( int size, gid_t grouplist[] )
125 return _getgroups(size, grouplist);
129 // Create New Session(process group)
131 EXPORT_C pid_t setsid( void )
139 EXPORT_C pid_t getppid( void )
145 // Set file mode creation mask
147 EXPORT_C mode_t umask(mode_t cmask)
149 return _umask(cmask);
153 // change owner and group of a file
155 EXPORT_C int chown(const char *path, uid_t owner, gid_t group)
157 return _chown(path, owner, group);
161 //change the owner and group of a symbolic link
163 EXPORT_C int lchown(const char *path, uid_t owner, gid_t group)
165 return _lchown(path, owner, group);
169 // Initialize supplementry group list
171 EXPORT_C int initgroups(const char */*name*/, gid_t /*basegid*/)
176 // yield control to a similar or higher priority thread
178 EXPORT_C int sched_yield( void )
184 //Return the maximum priority as 0.
187 EXPORT_C int sched_get_priority_max(int /*policy*/)
189 /* returning absolute max priorit, needs to be reviewed*/
194 // Return the minimum priority as 0.
196 EXPORT_C int sched_get_priority_min(int /*policy*/)
201 // Set end of the data segment to specified value.
202 EXPORT_C int brk(const void* /*end_data_seg*/)