diff options
| author | Paul Eggert | 2011-03-14 15:52:28 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-03-14 15:52:28 -0700 |
| commit | a70072c9a5be8a9cdd4d848b30ee5c82ee5c0987 (patch) | |
| tree | 69d86de3c947b0d62d97cbfd24b923059ff060a7 /src | |
| parent | a0977c44540ebf331dde6f673f4fbf735b4e30ac (diff) | |
| download | emacs-a70072c9a5be8a9cdd4d848b30ee5c82ee5c0987.tar.gz emacs-a70072c9a5be8a9cdd4d848b30ee5c82ee5c0987.zip | |
* sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/sysdep.c | 19 |
2 files changed, 12 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index edc79329a3b..0840e5ec9f0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2011-03-14 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-03-14 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * sysdep.c (system_process_attributes): Rename vars to avoid shadowing. | ||
| 4 | |||
| 3 | * process.c (serial_open, serial_configure): Move decls from here ... | 5 | * process.c (serial_open, serial_configure): Move decls from here ... |
| 4 | * systty.h: ... to here, so that they can be checked. | 6 | * systty.h: ... to here, so that they can be checked. |
| 5 | 7 | ||
diff --git a/src/sysdep.c b/src/sysdep.c index e5bf27f4fec..b8fbf863074 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -2667,8 +2667,8 @@ system_process_attributes (Lisp_Object pid) | |||
| 2667 | size_t cmdsize = 0, cmdline_size; | 2667 | size_t cmdsize = 0, cmdline_size; |
| 2668 | unsigned char c; | 2668 | unsigned char c; |
| 2669 | int proc_id, ppid, uid, gid, pgrp, sess, tty, tpgid, thcount; | 2669 | int proc_id, ppid, uid, gid, pgrp, sess, tty, tpgid, thcount; |
| 2670 | unsigned long long utime, stime, cutime, cstime, start; | 2670 | unsigned long long u_time, s_time, cutime, cstime, start; |
| 2671 | long priority, nice, rss; | 2671 | long priority, niceness, rss; |
| 2672 | unsigned long minflt, majflt, cminflt, cmajflt, vsize; | 2672 | unsigned long minflt, majflt, cminflt, cmajflt, vsize; |
| 2673 | time_t sec; | 2673 | time_t sec; |
| 2674 | unsigned usec; | 2674 | unsigned usec; |
| @@ -2748,8 +2748,8 @@ system_process_attributes (Lisp_Object pid) | |||
| 2748 | sscanf (p, "%c %d %d %d %d %d %*u %lu %lu %lu %lu %Lu %Lu %Lu %Lu %ld %ld %d %*d %Lu %lu %ld", | 2748 | sscanf (p, "%c %d %d %d %d %d %*u %lu %lu %lu %lu %Lu %Lu %Lu %Lu %ld %ld %d %*d %Lu %lu %ld", |
| 2749 | &c, &ppid, &pgrp, &sess, &tty, &tpgid, | 2749 | &c, &ppid, &pgrp, &sess, &tty, &tpgid, |
| 2750 | &minflt, &cminflt, &majflt, &cmajflt, | 2750 | &minflt, &cminflt, &majflt, &cmajflt, |
| 2751 | &utime, &stime, &cutime, &cstime, | 2751 | &u_time, &s_time, &cutime, &cstime, |
| 2752 | &priority, &nice, &thcount, &start, &vsize, &rss); | 2752 | &priority, &niceness, &thcount, &start, &vsize, &rss); |
| 2753 | { | 2753 | { |
| 2754 | char state_str[2]; | 2754 | char state_str[2]; |
| 2755 | 2755 | ||
| @@ -2777,13 +2777,14 @@ system_process_attributes (Lisp_Object pid) | |||
| 2777 | if (clocks_per_sec < 0) | 2777 | if (clocks_per_sec < 0) |
| 2778 | clocks_per_sec = 100; | 2778 | clocks_per_sec = 100; |
| 2779 | attrs = Fcons (Fcons (Qutime, | 2779 | attrs = Fcons (Fcons (Qutime, |
| 2780 | ltime_from_jiffies (utime, clocks_per_sec)), | 2780 | ltime_from_jiffies (u_time, clocks_per_sec)), |
| 2781 | attrs); | 2781 | attrs); |
| 2782 | attrs = Fcons (Fcons (Qstime, | 2782 | attrs = Fcons (Fcons (Qstime, |
| 2783 | ltime_from_jiffies (stime, clocks_per_sec)), | 2783 | ltime_from_jiffies (s_time, clocks_per_sec)), |
| 2784 | attrs); | 2784 | attrs); |
| 2785 | attrs = Fcons (Fcons (Qtime, | 2785 | attrs = Fcons (Fcons (Qtime, |
| 2786 | ltime_from_jiffies (stime+utime, clocks_per_sec)), | 2786 | ltime_from_jiffies (s_time + u_time, |
| 2787 | clocks_per_sec)), | ||
| 2787 | attrs); | 2788 | attrs); |
| 2788 | attrs = Fcons (Fcons (Qcutime, | 2789 | attrs = Fcons (Fcons (Qcutime, |
| 2789 | ltime_from_jiffies (cutime, clocks_per_sec)), | 2790 | ltime_from_jiffies (cutime, clocks_per_sec)), |
| @@ -2795,7 +2796,7 @@ system_process_attributes (Lisp_Object pid) | |||
| 2795 | ltime_from_jiffies (cstime+cutime, clocks_per_sec)), | 2796 | ltime_from_jiffies (cstime+cutime, clocks_per_sec)), |
| 2796 | attrs); | 2797 | attrs); |
| 2797 | attrs = Fcons (Fcons (Qpri, make_number (priority)), attrs); | 2798 | attrs = Fcons (Fcons (Qpri, make_number (priority)), attrs); |
| 2798 | attrs = Fcons (Fcons (Qnice, make_number (nice)), attrs); | 2799 | attrs = Fcons (Fcons (Qnice, make_number (niceness)), attrs); |
| 2799 | attrs = Fcons (Fcons (Qthcount, make_fixnum_or_float (thcount_eint)), attrs); | 2800 | attrs = Fcons (Fcons (Qthcount, make_fixnum_or_float (thcount_eint)), attrs); |
| 2800 | EMACS_GET_TIME (tnow); | 2801 | EMACS_GET_TIME (tnow); |
| 2801 | get_up_time (&sec, &usec); | 2802 | get_up_time (&sec, &usec); |
| @@ -2825,7 +2826,7 @@ system_process_attributes (Lisp_Object pid) | |||
| 2825 | make_number | 2826 | make_number |
| 2826 | (EMACS_USECS (telapsed)))), | 2827 | (EMACS_USECS (telapsed)))), |
| 2827 | attrs); | 2828 | attrs); |
| 2828 | time_from_jiffies (utime + stime, clocks_per_sec, &sec, &usec); | 2829 | time_from_jiffies (u_time + s_time, clocks_per_sec, &sec, &usec); |
| 2829 | pcpu = (sec + usec / 1000000.0) / (EMACS_SECS (telapsed) + EMACS_USECS (telapsed) / 1000000.0); | 2830 | pcpu = (sec + usec / 1000000.0) / (EMACS_SECS (telapsed) + EMACS_USECS (telapsed) / 1000000.0); |
| 2830 | if (pcpu > 1.0) | 2831 | if (pcpu > 1.0) |
| 2831 | pcpu = 1.0; | 2832 | pcpu = 1.0; |