diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-01-11 18:44:15 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-01-11 18:44:15 +0100 |
commit | 4c179373e07fbc1d8fc8e53c7096fce9ee4b08b6 (patch) | |
tree | 0b00e7ad22d5ae32319571b3af8bbefe65e35ef0 /shell | |
parent | ed15dde60a72dce888df10295a916b199346929d (diff) | |
download | busybox-w32-4c179373e07fbc1d8fc8e53c7096fce9ee4b08b6.tar.gz busybox-w32-4c179373e07fbc1d8fc8e53c7096fce9ee4b08b6.tar.bz2 busybox-w32-4c179373e07fbc1d8fc8e53c7096fce9ee4b08b6.zip |
ash: 16-bit ->nprocs field is a pain for many CPUs
function old new delta
getoptscmd 527 540 +13
getjob 280 286 +6
makejob 278 282 +4
forkchild 602 600 -2
waitcmd 208 205 -3
showjob 382 379 -3
getstatus 83 80 -3
dowait 408 405 -3
freejob 93 89 -4
fg_bgcmd 290 286 -4
forkshell 260 255 -5
killcmd 224 218 -6
jobno 17 11 -6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/10 up/down: 23/-39) Total: -16 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c index 02545f565..bfdd94047 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -3392,12 +3392,13 @@ struct job { | |||
3392 | #if JOBS | 3392 | #if JOBS |
3393 | int stopstatus; /* status of a stopped job */ | 3393 | int stopstatus; /* status of a stopped job */ |
3394 | #endif | 3394 | #endif |
3395 | uint32_t | 3395 | unsigned nprocs; /* number of processes */ |
3396 | nprocs: 16, /* number of processes */ | 3396 | |
3397 | state: 8, | ||
3398 | #define JOBRUNNING 0 /* at least one proc running */ | 3397 | #define JOBRUNNING 0 /* at least one proc running */ |
3399 | #define JOBSTOPPED 1 /* all procs are stopped */ | 3398 | #define JOBSTOPPED 1 /* all procs are stopped */ |
3400 | #define JOBDONE 2 /* all procs are completed */ | 3399 | #define JOBDONE 2 /* all procs are completed */ |
3400 | unsigned | ||
3401 | state: 8, | ||
3401 | #if JOBS | 3402 | #if JOBS |
3402 | sigint: 1, /* job was killed by SIGINT */ | 3403 | sigint: 1, /* job was killed by SIGINT */ |
3403 | jobctl: 1, /* job running under job control */ | 3404 | jobctl: 1, /* job running under job control */ |