diff options
Diffstat (limited to 'kernel/timer.c')
-rw-r--r-- | kernel/timer.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index dbd50fabe4c7..dee3f641a7a7 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -1018,21 +1018,6 @@ unsigned long get_next_timer_interrupt(unsigned long now) | |||
1018 | } | 1018 | } |
1019 | #endif | 1019 | #endif |
1020 | 1020 | ||
1021 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING | ||
1022 | void account_process_tick(struct task_struct *p, int user_tick) | ||
1023 | { | ||
1024 | cputime_t one_jiffy = jiffies_to_cputime(1); | ||
1025 | |||
1026 | if (user_tick) { | ||
1027 | account_user_time(p, one_jiffy); | ||
1028 | account_user_time_scaled(p, cputime_to_scaled(one_jiffy)); | ||
1029 | } else { | ||
1030 | account_system_time(p, HARDIRQ_OFFSET, one_jiffy); | ||
1031 | account_system_time_scaled(p, cputime_to_scaled(one_jiffy)); | ||
1032 | } | ||
1033 | } | ||
1034 | #endif | ||
1035 | |||
1036 | /* | 1021 | /* |
1037 | * Called from the timer interrupt handler to charge one tick to the current | 1022 | * Called from the timer interrupt handler to charge one tick to the current |
1038 | * process. user_tick is 1 if the tick is user time, 0 for system. | 1023 | * process. user_tick is 1 if the tick is user time, 0 for system. |
@@ -1192,25 +1177,25 @@ asmlinkage long sys_getppid(void) | |||
1192 | asmlinkage long sys_getuid(void) | 1177 | asmlinkage long sys_getuid(void) |
1193 | { | 1178 | { |
1194 | /* Only we change this so SMP safe */ | 1179 | /* Only we change this so SMP safe */ |
1195 | return current->uid; | 1180 | return current_uid(); |
1196 | } | 1181 | } |
1197 | 1182 | ||
1198 | asmlinkage long sys_geteuid(void) | 1183 | asmlinkage long sys_geteuid(void) |
1199 | { | 1184 | { |
1200 | /* Only we change this so SMP safe */ | 1185 | /* Only we change this so SMP safe */ |
1201 | return current->euid; | 1186 | return current_euid(); |
1202 | } | 1187 | } |
1203 | 1188 | ||
1204 | asmlinkage long sys_getgid(void) | 1189 | asmlinkage long sys_getgid(void) |
1205 | { | 1190 | { |
1206 | /* Only we change this so SMP safe */ | 1191 | /* Only we change this so SMP safe */ |
1207 | return current->gid; | 1192 | return current_gid(); |
1208 | } | 1193 | } |
1209 | 1194 | ||
1210 | asmlinkage long sys_getegid(void) | 1195 | asmlinkage long sys_getegid(void) |
1211 | { | 1196 | { |
1212 | /* Only we change this so SMP safe */ | 1197 | /* Only we change this so SMP safe */ |
1213 | return current->egid; | 1198 | return current_egid(); |
1214 | } | 1199 | } |
1215 | 1200 | ||
1216 | #endif | 1201 | #endif |