aboutsummaryrefslogtreecommitdiff
path: root/miscutils/taskset.c
Commit message (Collapse)AuthorAgeFilesLines
* Sort some miscutils/ applets into coreutils or util-linuxGravatar Denys Vlasenko2017-04-121-221/+0
| | | | | | No code changes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* taskset: simplify code a bit; tweak --helpGravatar Denys Vlasenko2017-01-301-11/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* taskset: separate "current" and "new" stringsGravatar Denys Vlasenko2017-01-291-2/+2
| | | | | | | | | | Better for constant sharing: text data bss dec hex filename 912997 485 6856 920338 e0b12 busybox_old 912988 485 6856 920329 e0b09 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* taskset: rewrite to be task size-agnosticGravatar Denys Vlasenko2017-01-291-102/+103
| | | | | | | | | | function old new delta packed_usage 31130 31190 +60 taskset_main 623 525 -98 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 60/-98) Total: -38 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* taskset: fix non-fancy cpuset printing on big-endianGravatar Arnout Vandecappelle (Essensium/Mind)2016-02-261-19/+18
| | | | | | | | | | | | | | | | | | | | The non-fancy version of the from_cpuset uses CPU_SETSIZE as if it represents the number of bytes in the cpuset, while it is actually the number of bits. This leads to out-of-bounds accesses on the cpu_set_t in the big-endian case. Basically all uses of CPU_SETSIZE have to be divided by 8. This is done correctly in the fancy version of from_cpuset. In addition, the big-endian case is completely wrong to begin with. All standard C libraries that I know of implement cpu_set_t as an unsigned long array, so both for big and little endian, the least significant bits are in the beginning of the array. Therefore, the approach taken for the little endian case is equally valid. We only need special handling for big endian when CPU_SETSIZE is large and we use an unsigned long long to get more bits out. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: more BUILD_BUG_ON conversionsGravatar Denys Vlasenko2015-10-131-4/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* taskset: fix logic error in "if it doesn't start with 0x..."Gravatar Denys Vlasenko2014-08-311-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* taskset: support CPU masks for more than 64 CPUsGravatar Denys Vlasenko2014-08-171-7/+79
| | | | | | | function old new delta taskset_main 522 631 +109 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove "Options:" string from help textsGravatar Denys Vlasenko2011-06-051-1/+0
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move remaining help text from include/usage.src.hGravatar Pere Orga2011-04-111-0/+18
| | | | | Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make GNU licensing statement forms more regularGravatar Denys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: introduce and use BB_EXECVP_or_die()Gravatar Pascal Bellard2010-07-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta BB_EXECVP_or_die - 47 +47 time_main 1042 1043 +1 chrt_main 371 364 -7 ionice_main 292 282 -10 setsid_main 69 56 -13 nohup_main 236 223 -13 cttyhack_main 266 253 -13 chroot_main 94 81 -13 chpst_main 746 733 -13 timeout_main 297 279 -18 taskset_main 541 522 -19 vfork_child 67 45 -22 parse 975 953 -22 lpd_main 770 748 -22 launch_helper 192 170 -22 tcpudpsvd_main 1810 1782 -28 nice_main 190 156 -34 env_main 242 206 -36 run_command 221 174 -47 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/17 up/down: 48/-352) Total: -304 bytes Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make exec failure message more consistentGravatar Denys Vlasenko2010-06-251-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* - update my name. No obj-code changes ;)Gravatar Bernhard Reutner-Fischer2008-09-251-1/+1
|
* taskset: fix some careless code in both fancy and non-fancy cases.Gravatar Denis Vlasenko2008-07-111-13/+35
| | | | | -5 bytes for fancy, +5 for non-fancy
* *: rename ATTRIBUTE_XXX to just XXX.Gravatar Denis Vlasenko2008-07-051-1/+1
|
* taskset: (1ull < 65) like ops are not good, avoid thatGravatar Denis Vlasenko2008-04-251-1/+3
|
* patch: shrink by Pascal Bellard <pascal.bellard AT ads-lu.com> (-80 bytes)Gravatar Denis Vlasenko2008-03-231-1/+0
| | | | | *: removal of #include <getopt.h>
* taskset: fix false failure in testsuiteGravatar Denis Vlasenko2008-03-221-0/+5
|
* *: fix various kinds of damage to letter 'c' in Arkadiusz Mickiewicz' surname.Gravatar Denis Vlasenko2008-03-171-39/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | chrt,taskset,dc,eject: shrink crontab: call "vi" with just name, no path watchdog: intercept all fatal signals function old new delta xstrtoull_range - 35 +35 static.sg_commands - 18 +18 packed_usage 23698 23712 +14 watchdog_main 148 151 +3 crontab_main 637 638 +1 base 1 - -1 static.ps 4 - -4 pointer 4 - -4 stack_machine 99 92 -7 run_command 273 260 -13 eject_main 360 343 -17 static.C 30 12 -18 ptok 61 38 -23 xstrtol_range 27 - -27 get_token 35 - -35 taskset_main 586 550 -36 chrt_main 411 372 -39 dc_main 158 117 -41 time_main 1127 1037 -90 ------------------------------------------------------------------------------ (add/remove: 2/5 grow/shrink: 3/9 up/down: 71/-355) Total: -284 bytes text data bss dec hex filename 793680 662 7420 801762 c3be2 busybox_old 793327 662 7412 801401 c3a79 busybox_unstripped
* add -fvisibility=hidden to CC flags, mark XXX_main functionsGravatar Denis Vlasenko2007-10-111-2/+2
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* 'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.Gravatar Denis Vlasenko2007-10-011-1/+1
| | | | | 263 bytes saved.
* don't pass argc in getopt32, it's superfluousGravatar Denis Vlasenko2007-08-181-1/+1
| | | | | | | | (add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes text data bss dec hex filename 773469 1058 11092 785619 bfcd3 busybox_old 772644 1058 11092 784794 bf99a busybox_unstripped
* usage.c: remove reference to busybox.hGravatar Denis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* EXEC_PREFER_APPLETS support by Gabriel L. Somlo <somlo@cmu.edu>Gravatar Denis Vlasenko2007-02-061-1/+1
|
* suppress warnings about easch <applet>_main() havingGravatar Denis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* taskset: fix incorrect rage spec and allow 0xXXX inputGravatar Denis Vlasenko2007-01-291-1/+1
| | | | ping: shave off 60 bytes
* done a dozen of randconfig test. guess what? ALL failed...Gravatar Denis Vlasenko2006-12-301-15/+17
| | | | these are resulting fixes
* - revert r15563 (pull current version of taskset off the busybox_scratch branch)Gravatar Bernhard Reutner-Fischer2006-11-221-0/+96
|
* Revert taskset for 1.2.0. It emits a warning, breaks building under RH9,Gravatar Rob Landley2006-06-301-67/+0
| | | | | and nobody seemed interested in fixing it despite repeated complaints. I'll worry about it in the 1.3 timeframe...
* - add applet taskset to set/retrieve the CPU affinity of a processGravatar Bernhard Reutner-Fischer2006-06-071-0/+67
text data bss dec hex filename 584 0 0 584 248 taskset.o.gcc-2.95 509 0 0 509 1fd taskset.o.gcc-3.3 505 0 0 505 1f9 taskset.o.gcc-3.4 506 0 0 506 1fa taskset.o.gcc-4.0 498 0 0 498 1f2 taskset.o.gcc-4.1 495 0 0 495 1ef taskset.o.gcc-4.2-HEAD