Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/procps/top.c
- Timestamp:
- Jan 1, 2014, 12:47:38 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi-busybox/procps/top.c
r2725 r3232 20 20 * Sept 2008: Vineet Gupta <vineet.gupta@arc.com> 21 21 * Added Support for reporting SMP Information 22 * - CPU where Process was last seen running22 * - CPU where process was last seen running 23 23 * (to see effect of sched_setaffinity() etc) 24 * - CPU Time Split (idle/IO/wait etc) PERCPU24 * - CPU time split (idle/IO/wait etc) per CPU 25 25 * 26 26 * Copyright (c) 1992 Branko Lankester … … 31 31 * Licensed under GPLv2, see file LICENSE in this source tree. 32 32 */ 33 /* How to snapshot /proc for debugging top problems: 34 * for f in /proc/[0-9]*""/stat; do 35 * n=${f#/proc/} 36 * n=${n%/stat}_stat 37 * cp $f $n 38 * done 39 * cp /proc/stat /proc/meminfo /proc/loadavg . 40 * top -bn1 >top.out 41 * 42 * ...and how to run top on it on another machine: 43 * rm -rf proc; mkdir proc 44 * for f in [0-9]*_stat; do 45 * p=${f%_stat} 46 * mkdir -p proc/$p 47 * cp $f proc/$p/stat 48 * done 49 * cp stat meminfo loadavg proc 50 * chroot . ./top -bn1 >top1.out 51 */ 52 53 //config:config TOP 54 //config: bool "top" 55 //config: default y 56 //config: help 57 //config: The top program provides a dynamic real-time view of a running 58 //config: system. 59 //config: 60 //config:config FEATURE_TOP_CPU_USAGE_PERCENTAGE 61 //config: bool "Show CPU per-process usage percentage" 62 //config: default y 63 //config: depends on TOP 64 //config: help 65 //config: Make top display CPU usage for each process. 66 //config: This adds about 2k. 67 //config: 68 //config:config FEATURE_TOP_CPU_GLOBAL_PERCENTS 69 //config: bool "Show CPU global usage percentage" 70 //config: default y 71 //config: depends on FEATURE_TOP_CPU_USAGE_PERCENTAGE 72 //config: help 73 //config: Makes top display "CPU: NN% usr NN% sys..." line. 74 //config: This adds about 0.5k. 75 //config: 76 //config:config FEATURE_TOP_SMP_CPU 77 //config: bool "SMP CPU usage display ('c' key)" 78 //config: default y 79 //config: depends on FEATURE_TOP_CPU_GLOBAL_PERCENTS 80 //config: help 81 //config: Allow 'c' key to switch between individual/cumulative CPU stats 82 //config: This adds about 0.5k. 83 //config: 84 //config:config FEATURE_TOP_DECIMALS 85 //config: bool "Show 1/10th of a percent in CPU/mem statistics" 86 //config: default y 87 //config: depends on FEATURE_TOP_CPU_USAGE_PERCENTAGE 88 //config: help 89 //config: Show 1/10th of a percent in CPU/mem statistics. 90 //config: This adds about 0.3k. 91 //config: 92 //config:config FEATURE_TOP_SMP_PROCESS 93 //config: bool "Show CPU process runs on ('j' field)" 94 //config: default y 95 //config: depends on TOP 96 //config: help 97 //config: Show CPU where process was last found running on. 98 //config: This is the 'j' field. 99 //config: 100 //config:config FEATURE_TOPMEM 101 //config: bool "Topmem command ('s' key)" 102 //config: default y 103 //config: depends on TOP 104 //config: help 105 //config: Enable 's' in top (gives lots of memory info). 33 106 34 107 #include "libbb.h" … … 74 147 top_status_t *top; 75 148 int ntop; 149 smallint inverted; 76 150 #if ENABLE_FEATURE_TOPMEM 77 151 smallint sort_field; 78 smallint inverted;79 152 #endif 80 153 #if ENABLE_FEATURE_TOP_SMP_CPU 81 154 smallint smp_cpu_info; /* one/many cpu info lines? */ 82 155 #endif 156 unsigned lines; /* screen height */ 83 157 #if ENABLE_FEATURE_USE_TERMIOS 84 158 struct termios initial_settings; 159 int scroll_ofs; 160 #define G_scroll_ofs G.scroll_ofs 161 #else 162 #define G_scroll_ofs 0 85 163 #endif 86 164 #if !ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE … … 100 178 int num_cpus; 101 179 #endif 180 #if ENABLE_FEATURE_USE_TERMIOS 181 char kbd_input[KEYCODE_BUFFER_SIZE]; 182 #endif 102 183 char line_buf[80]; 103 184 }; //FIX_ALIASING; - large code growth … … 108 189 char BUG_line_buf_too_small[LINE_BUF_SIZE > 80 ? 1 : -1]; 109 190 }; 110 #define INIT_G() do { } while (0)111 191 #define top (G.top ) 112 192 #define ntop (G.ntop ) … … 125 205 #define total_pcpu (G.total_pcpu ) 126 206 #define line_buf (G.line_buf ) 207 #define INIT_G() do { } while (0) 127 208 128 209 enum { … … 176 257 cmp_val = (*sort_function[i])(a, b); 177 258 if (cmp_val != 0) 178 return cmp_val;179 } 180 return 0;259 break; 260 } 261 return inverted ? -cmp_val : cmp_val; 181 262 } 182 263 … … 520 601 /* what info of the processes is shown */ 521 602 printf(OPT_BATCH_MODE ? "%.*s" : "\033[7m%.*s\033[0m", scr_width, 522 " PID PPID USER STAT VSZ % MEM"603 " PID PPID USER STAT VSZ %VSZ" 523 604 IF_FEATURE_TOP_SMP_PROCESS(" CPU") 524 605 IF_FEATURE_TOP_CPU_USAGE_PERCENTAGE(" %CPU") … … 538 619 #endif 539 620 /* 540 * MEM%= s->vsz/MemTotal621 * %VSZ = s->vsz/MemTotal 541 622 */ 542 623 pmem_shift = BITS_PER_INT-11; … … 547 628 pmem_shift -= 2; 548 629 } 549 pmem_half = (1U << pmem_shift) / (ENABLE_FEATURE_TOP_DECIMALS ? 20 : 2);630 pmem_half = (1U << pmem_shift) / (ENABLE_FEATURE_TOP_DECIMALS ? 20 : 2); 550 631 #if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE 551 632 busy_jifs = cur_jif.busy - prev_jif.busy; … … 578 659 pcpu_shift -= 2; 579 660 } 580 pcpu_half = (1U << pcpu_shift) / (ENABLE_FEATURE_TOP_DECIMALS ? 20 : 2);661 pcpu_half = (1U << pcpu_shift) / (ENABLE_FEATURE_TOP_DECIMALS ? 20 : 2); 581 662 /* printf(" pmem_scale=%u pcpu_scale=%u ", pmem_scale, pcpu_scale); */ 582 663 #endif … … 584 665 /* Ok, all preliminary data is ready, go through the list */ 585 666 scr_width += 2; /* account for leading '\n' and trailing NUL */ 586 if (lines_rem > ntop )587 lines_rem = ntop ;588 s = top ;667 if (lines_rem > ntop - G_scroll_ofs) 668 lines_rem = ntop - G_scroll_ofs; 669 s = top + G_scroll_ofs; 589 670 while (--lines_rem >= 0) { 590 671 unsigned col; … … 598 679 else 599 680 sprintf(vsz_str_buf, "%7ld", s->vsz); 600 /* PID PPID USER STAT VSZ % MEM[%CPU] COMMAND */681 /* PID PPID USER STAT VSZ %VSZ [%CPU] COMMAND */ 601 682 col = snprintf(line_buf, scr_width, 602 683 "\n" "%5u%6u %-8.8s %s%s" FMT … … 631 712 free(top); 632 713 top = NULL; 633 ntop = 0;634 714 } 635 715 … … 638 718 static void reset_term(void) 639 719 { 640 tcsetattr_stdin_TCSANOW(&initial_settings); 720 if (!OPT_BATCH_MODE) 721 tcsetattr_stdin_TCSANOW(&initial_settings); 641 722 if (ENABLE_FEATURE_CLEAN_UP) { 642 723 clearmems(); … … 647 728 } 648 729 649 static void sig_catcher(int sig UNUSED_PARAM)730 static void sig_catcher(int sig) 650 731 { 651 732 reset_term(); 652 _exit(EXIT_FAILURE);733 kill_myself_with_sig(sig); 653 734 } 654 735 … … 775 856 #define HDR_STR " PID VSZ VSZRW RSS (SHR) DIRTY (SHR) STACK" 776 857 #define MIN_WIDTH sizeof(HDR_STR) 777 const topmem_status_t *s = topmem ;858 const topmem_status_t *s = topmem + G_scroll_ofs; 778 859 779 860 display_topmem_header(scr_width, &lines_rem); 780 861 strcpy(line_buf, HDR_STR " COMMAND"); 781 line_buf[ 5 + sort_field * 6] = '*';862 line_buf[11 + sort_field * 6] = "^_"[inverted]; 782 863 printf(OPT_BATCH_MODE ? "%.*s" : "\e[7m%.*s\e[0m", scr_width, line_buf); 783 864 lines_rem--; 784 865 785 if (lines_rem > ntop )786 lines_rem = ntop ;866 if (lines_rem > ntop - G_scroll_ofs) 867 lines_rem = ntop - G_scroll_ofs; 787 868 while (--lines_rem >= 0) { 788 869 /* PID VSZ VSZRW RSS (SHR) DIRTY (SHR) COMMAND */ … … 832 913 | PSSCAN_SMAPS 833 914 | PSSCAN_COMM, 915 EXIT_MASK = (unsigned)-1, 834 916 }; 917 918 #if ENABLE_FEATURE_USE_TERMIOS 919 static unsigned handle_input(unsigned scan_mask, unsigned interval) 920 { 921 struct pollfd pfd[1]; 922 923 if (option_mask32 & OPT_EOF) { 924 /* EOF on stdin ("top </dev/null") */ 925 sleep(interval); 926 return scan_mask; 927 } 928 929 pfd[0].fd = 0; 930 pfd[0].events = POLLIN; 931 932 while (1) { 933 int32_t c; 934 935 c = read_key(STDIN_FILENO, G.kbd_input, interval * 1000); 936 if (c == -1 && errno != EAGAIN) { 937 /* error/EOF */ 938 option_mask32 |= OPT_EOF; 939 break; 940 } 941 interval = 0; 942 943 if (c == initial_settings.c_cc[VINTR]) 944 return EXIT_MASK; 945 if (c == initial_settings.c_cc[VEOF]) 946 return EXIT_MASK; 947 948 if (c == KEYCODE_UP) { 949 G_scroll_ofs--; 950 goto normalize_ofs; 951 } 952 if (c == KEYCODE_DOWN) { 953 G_scroll_ofs++; 954 goto normalize_ofs; 955 } 956 if (c == KEYCODE_HOME) { 957 G_scroll_ofs = 0; 958 break; 959 } 960 if (c == KEYCODE_END) { 961 G_scroll_ofs = ntop - G.lines / 2; 962 goto normalize_ofs; 963 } 964 if (c == KEYCODE_PAGEUP) { 965 G_scroll_ofs -= G.lines / 2; 966 goto normalize_ofs; 967 } 968 if (c == KEYCODE_PAGEDOWN) { 969 G_scroll_ofs += G.lines / 2; 970 normalize_ofs: 971 if (G_scroll_ofs >= ntop) 972 G_scroll_ofs = ntop - 1; 973 if (G_scroll_ofs < 0) 974 G_scroll_ofs = 0; 975 break; 976 } 977 978 c |= 0x20; /* lowercase */ 979 if (c == 'q') 980 return EXIT_MASK; 981 982 if (c == 'n') { 983 IF_FEATURE_TOPMEM(scan_mask = TOP_MASK;) 984 sort_function[0] = pid_sort; 985 continue; 986 } 987 if (c == 'm') { 988 IF_FEATURE_TOPMEM(scan_mask = TOP_MASK;) 989 sort_function[0] = mem_sort; 990 # if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE 991 sort_function[1] = pcpu_sort; 992 sort_function[2] = time_sort; 993 # endif 994 continue; 995 } 996 # if ENABLE_FEATURE_SHOW_THREADS 997 if (c == 'h' 998 IF_FEATURE_TOPMEM(&& scan_mask != TOPMEM_MASK) 999 ) { 1000 scan_mask ^= PSSCAN_TASKS; 1001 continue; 1002 } 1003 # endif 1004 # if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE 1005 if (c == 'p') { 1006 IF_FEATURE_TOPMEM(scan_mask = TOP_MASK;) 1007 sort_function[0] = pcpu_sort; 1008 sort_function[1] = mem_sort; 1009 sort_function[2] = time_sort; 1010 continue; 1011 } 1012 if (c == 't') { 1013 IF_FEATURE_TOPMEM(scan_mask = TOP_MASK;) 1014 sort_function[0] = time_sort; 1015 sort_function[1] = mem_sort; 1016 sort_function[2] = pcpu_sort; 1017 continue; 1018 } 1019 # if ENABLE_FEATURE_TOPMEM 1020 if (c == 's') { 1021 scan_mask = TOPMEM_MASK; 1022 free(prev_hist); 1023 prev_hist = NULL; 1024 prev_hist_count = 0; 1025 sort_field = (sort_field + 1) % NUM_SORT_FIELD; 1026 continue; 1027 } 1028 # endif 1029 if (c == 'r') { 1030 inverted ^= 1; 1031 continue; 1032 } 1033 # if ENABLE_FEATURE_TOP_SMP_CPU 1034 /* procps-2.0.18 uses 'C', 3.2.7 uses '1' */ 1035 if (c == 'c' || c == '1') { 1036 /* User wants to toggle per cpu <> aggregate */ 1037 if (smp_cpu_info) { 1038 free(cpu_prev_jif); 1039 free(cpu_jif); 1040 cpu_jif = &cur_jif; 1041 cpu_prev_jif = &prev_jif; 1042 } else { 1043 /* Prepare for xrealloc() */ 1044 cpu_jif = cpu_prev_jif = NULL; 1045 } 1046 num_cpus = 0; 1047 smp_cpu_info = !smp_cpu_info; 1048 get_jiffy_counts(); 1049 continue; 1050 } 1051 # endif 1052 # endif 1053 break; /* unknown key -> force refresh */ 1054 } 1055 1056 return scan_mask; 1057 } 1058 #endif 1059 1060 //usage:#if ENABLE_FEATURE_SHOW_THREADS || ENABLE_FEATURE_TOP_SMP_CPU 1061 //usage:# define IF_SHOW_THREADS_OR_TOP_SMP(...) __VA_ARGS__ 1062 //usage:#else 1063 //usage:# define IF_SHOW_THREADS_OR_TOP_SMP(...) 1064 //usage:#endif 1065 //usage:#define top_trivial_usage 1066 //usage: "[-b] [-nCOUNT] [-dSECONDS]" IF_FEATURE_TOPMEM(" [-m]") 1067 //usage:#define top_full_usage "\n\n" 1068 //usage: "Provide a view of process activity in real time." 1069 //usage: "\n""Read the status of all processes from /proc each SECONDS" 1070 //usage: "\n""and display a screenful of them." 1071 //usage: "\n""Keys:" 1072 //usage: "\n"" N/M" 1073 //usage: IF_FEATURE_TOP_CPU_USAGE_PERCENTAGE("/P") 1074 //usage: IF_FEATURE_TOP_CPU_USAGE_PERCENTAGE("/T") 1075 //usage: ": " IF_FEATURE_TOPMEM("show CPU usage, ") "sort by pid/mem" 1076 //usage: IF_FEATURE_TOP_CPU_USAGE_PERCENTAGE("/cpu") 1077 //usage: IF_FEATURE_TOP_CPU_USAGE_PERCENTAGE("/time") 1078 //usage: IF_FEATURE_TOPMEM( 1079 //usage: "\n"" S: show memory" 1080 //usage: ) 1081 //usage: "\n"" R: reverse sort" 1082 //usage: IF_SHOW_THREADS_OR_TOP_SMP( 1083 //usage: "\n"" " 1084 //usage: IF_FEATURE_SHOW_THREADS("H: toggle threads") 1085 //usage: IF_FEATURE_SHOW_THREADS(IF_FEATURE_TOP_SMP_CPU(", ")) 1086 //usage: IF_FEATURE_TOP_SMP_CPU("1: toggle SMP") 1087 //usage: ) 1088 //usage: "\n"" Q,^C: exit" 1089 //usage: "\n" 1090 //usage: "\n""Options:" 1091 //usage: "\n"" -b Batch mode" 1092 //usage: "\n"" -n N Exit after N iterations" 1093 //usage: "\n"" -d N Delay between updates" 1094 //usage: IF_FEATURE_TOPMEM( 1095 //usage: "\n"" -m Same as 's' key" 1096 //usage: ) 1097 1098 /* Interactive testing: 1099 * echo sss | ./busybox top 1100 * - shows memory screen 1101 * echo sss | ./busybox top -bn1 >mem 1102 * - saves memory screen - the *whole* list, not first NROWS processes! 1103 * echo .m.s.s.s.s.s.s.q | ./busybox top -b >z 1104 * - saves several different screens, and exits 1105 * 1106 * TODO: -i STRING param as a better alternative? 1107 */ 835 1108 836 1109 int top_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; … … 838 1111 { 839 1112 int iterations; 840 unsigned lines, col; 841 int lines_rem; 1113 unsigned col; 842 1114 unsigned interval; 843 1115 char *str_interval, *str_iterations; … … 845 1117 #if ENABLE_FEATURE_USE_TERMIOS 846 1118 struct termios new_settings; 847 struct pollfd pfd[1];848 unsigned char c;849 850 pfd[0].fd = 0;851 pfd[0].events = POLLIN;852 1119 #endif 853 1120 … … 886 1153 /* change to /proc */ 887 1154 xchdir("/proc"); 888 #if ENABLE_FEATURE_USE_TERMIOS889 tcgetattr(0, (void *) &initial_settings);890 memcpy(&new_settings, &initial_settings, sizeof(new_settings));891 /* unbuffered input, turn off echo */892 new_settings.c_lflag &= ~(ISIG | ICANON | ECHO | ECHONL);893 894 bb_signals(BB_FATAL_SIGS, sig_catcher);895 tcsetattr_stdin_TCSANOW(&new_settings);896 #endif897 1155 898 1156 #if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE … … 904 1162 #endif 905 1163 906 while (1) { 1164 if (OPT_BATCH_MODE) { 1165 option_mask32 |= OPT_EOF; 1166 } 1167 #if ENABLE_FEATURE_USE_TERMIOS 1168 else { 1169 tcgetattr(0, (void *) &initial_settings); 1170 memcpy(&new_settings, &initial_settings, sizeof(new_settings)); 1171 /* unbuffered input, turn off echo */ 1172 new_settings.c_lflag &= ~(ISIG | ICANON | ECHO | ECHONL); 1173 tcsetattr_stdin_TCSANOW(&new_settings); 1174 } 1175 1176 bb_signals(BB_FATAL_SIGS, sig_catcher); 1177 1178 /* Eat initial input, if any */ 1179 scan_mask = handle_input(scan_mask, 0); 1180 #endif 1181 1182 while (scan_mask != EXIT_MASK) { 907 1183 procps_status_t *p = NULL; 908 1184 909 lines = 24; /* default */ 910 col = 79; 1185 if (OPT_BATCH_MODE) { 1186 G.lines = INT_MAX; 1187 col = LINE_BUF_SIZE - 2; /* +2 bytes for '\n', NUL */ 1188 } else { 1189 G.lines = 24; /* default */ 1190 col = 79; 911 1191 #if ENABLE_FEATURE_USE_TERMIOS 912 /* We output to stdout, we need size of stdout (not stdin)! */ 913 get_terminal_width_height(STDOUT_FILENO, &col, &lines); 914 if (lines < 5 || col < 10) { 915 sleep(interval); 916 continue; 917 } 918 #endif 919 if (col > LINE_BUF_SIZE-2) /* +2 bytes for '\n', NUL, */ 920 col = LINE_BUF_SIZE-2; 1192 /* We output to stdout, we need size of stdout (not stdin)! */ 1193 get_terminal_width_height(STDOUT_FILENO, &col, &G.lines); 1194 if (G.lines < 5 || col < 10) { 1195 sleep(interval); 1196 continue; 1197 } 1198 #endif 1199 if (col > LINE_BUF_SIZE - 2) 1200 col = LINE_BUF_SIZE - 2; 1201 } 921 1202 922 1203 /* read process IDs & status for all the processes */ 1204 ntop = 0; 923 1205 while ((p = procps_scan(p, scan_mask)) != NULL) { 924 1206 int n; … … 986 1268 } 987 1269 #endif 988 lines_rem = lines;989 if (OPT_BATCH_MODE) {990 lines_rem = INT_MAX;991 }992 1270 if (scan_mask != TOPMEM_MASK) 993 display_process_list( lines_rem, col);1271 display_process_list(G.lines, col); 994 1272 #if ENABLE_FEATURE_TOPMEM 995 1273 else 996 display_topmem_process_list( lines_rem, col);1274 display_topmem_process_list(G.lines, col); 997 1275 #endif 998 1276 clearmems(); … … 1002 1280 sleep(interval); 1003 1281 #else 1004 if (option_mask32 & (OPT_b|OPT_EOF)) 1005 /* batch mode, or EOF on stdin ("top </dev/null") */ 1006 sleep(interval); 1007 else if (safe_poll(pfd, 1, interval * 1000) > 0) { 1008 if (safe_read(STDIN_FILENO, &c, 1) != 1) { /* error/EOF? */ 1009 option_mask32 |= OPT_EOF; 1010 continue; 1011 } 1012 if (c == initial_settings.c_cc[VINTR]) 1013 break; 1014 c |= 0x20; /* lowercase */ 1015 if (c == 'q') 1016 break; 1017 if (c == 'n') { 1018 IF_FEATURE_TOPMEM(scan_mask = TOP_MASK;) 1019 sort_function[0] = pid_sort; 1020 } 1021 if (c == 'm') { 1022 IF_FEATURE_TOPMEM(scan_mask = TOP_MASK;) 1023 sort_function[0] = mem_sort; 1024 # if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE 1025 sort_function[1] = pcpu_sort; 1026 sort_function[2] = time_sort; 1027 # endif 1028 } 1029 # if ENABLE_FEATURE_SHOW_THREADS 1030 if (c == 'h' 1031 IF_FEATURE_TOPMEM(&& scan_mask != TOPMEM_MASK) 1032 ) { 1033 scan_mask ^= PSSCAN_TASKS; 1034 } 1035 # endif 1036 # if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE 1037 if (c == 'p') { 1038 IF_FEATURE_TOPMEM(scan_mask = TOP_MASK;) 1039 sort_function[0] = pcpu_sort; 1040 sort_function[1] = mem_sort; 1041 sort_function[2] = time_sort; 1042 } 1043 if (c == 't') { 1044 IF_FEATURE_TOPMEM(scan_mask = TOP_MASK;) 1045 sort_function[0] = time_sort; 1046 sort_function[1] = mem_sort; 1047 sort_function[2] = pcpu_sort; 1048 } 1049 # if ENABLE_FEATURE_TOPMEM 1050 if (c == 's') { 1051 scan_mask = TOPMEM_MASK; 1052 free(prev_hist); 1053 prev_hist = NULL; 1054 prev_hist_count = 0; 1055 sort_field = (sort_field + 1) % NUM_SORT_FIELD; 1056 } 1057 if (c == 'r') 1058 inverted ^= 1; 1059 # endif 1060 # if ENABLE_FEATURE_TOP_SMP_CPU 1061 /* procps-2.0.18 uses 'C', 3.2.7 uses '1' */ 1062 if (c == 'c' || c == '1') { 1063 /* User wants to toggle per cpu <> aggregate */ 1064 if (smp_cpu_info) { 1065 free(cpu_prev_jif); 1066 free(cpu_jif); 1067 cpu_jif = &cur_jif; 1068 cpu_prev_jif = &prev_jif; 1069 } else { 1070 /* Prepare for xrealloc() */ 1071 cpu_jif = cpu_prev_jif = NULL; 1072 } 1073 num_cpus = 0; 1074 smp_cpu_info = !smp_cpu_info; 1075 get_jiffy_counts(); 1076 } 1077 # endif 1078 # endif 1079 } 1282 scan_mask = handle_input(scan_mask, interval); 1080 1283 #endif /* FEATURE_USE_TERMIOS */ 1081 } /* end of "while ( 1)" */1284 } /* end of "while (not Q)" */ 1082 1285 1083 1286 bb_putchar('\n');
Note:
See TracChangeset
for help on using the changeset viewer.