acct.c (e21e696edb498c7f7eed42ba3096f6bbe13927b6) acct.c (76aac0e9a17742e60d408be1a706e9aaad370891)
1/*
2 * linux/kernel/acct.c
3 *
4 * BSD Process Accounting for Linux
5 *
6 * Author: Marco van Wieringen <mvw@planets.elm.net>
7 *
8 * Some code based on ideas and code from:

--- 516 unchanged lines hidden (view full) ---

525 comp2_t etime = encode_comp2_t(elapsed);
526 ac.ac_etime_hi = etime >> 16;
527 ac.ac_etime_lo = (u16) etime;
528 }
529#endif
530 do_div(elapsed, AHZ);
531 ac.ac_btime = get_seconds() - elapsed;
532 /* we really need to bite the bullet and change layout */
1/*
2 * linux/kernel/acct.c
3 *
4 * BSD Process Accounting for Linux
5 *
6 * Author: Marco van Wieringen <mvw@planets.elm.net>
7 *
8 * Some code based on ideas and code from:

--- 516 unchanged lines hidden (view full) ---

525 comp2_t etime = encode_comp2_t(elapsed);
526 ac.ac_etime_hi = etime >> 16;
527 ac.ac_etime_lo = (u16) etime;
528 }
529#endif
530 do_div(elapsed, AHZ);
531 ac.ac_btime = get_seconds() - elapsed;
532 /* we really need to bite the bullet and change layout */
533 ac.ac_uid = current->uid;
534 ac.ac_gid = current->gid;
533 current_uid_gid(&ac.ac_uid, &ac.ac_gid);
535#if ACCT_VERSION==2
536 ac.ac_ahz = AHZ;
537#endif
538#if ACCT_VERSION==1 || ACCT_VERSION==2
539 /* backward-compatible 16 bit fields */
534#if ACCT_VERSION==2
535 ac.ac_ahz = AHZ;
536#endif
537#if ACCT_VERSION==1 || ACCT_VERSION==2
538 /* backward-compatible 16 bit fields */
540 ac.ac_uid16 = current->uid;
541 ac.ac_gid16 = current->gid;
539 ac.ac_uid16 = ac.ac_uid;
540 ac.ac_gid16 = ac.ac_gid;
542#endif
543#if ACCT_VERSION==3
544 ac.ac_pid = task_tgid_nr_ns(current, ns);
545 rcu_read_lock();
546 ac.ac_ppid = task_tgid_nr_ns(rcu_dereference(current->real_parent), ns);
547 rcu_read_unlock();
548#endif
549

--- 127 unchanged lines hidden ---
541#endif
542#if ACCT_VERSION==3
543 ac.ac_pid = task_tgid_nr_ns(current, ns);
544 rcu_read_lock();
545 ac.ac_ppid = task_tgid_nr_ns(rcu_dereference(current->real_parent), ns);
546 rcu_read_unlock();
547#endif
548

--- 127 unchanged lines hidden ---