summaryrefslogtreecommitdiff
path: root/miscutils/taskset.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/taskset.c')
-rw-r--r--miscutils/taskset.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/miscutils/taskset.c b/miscutils/taskset.c
index 389ef43..77fc864 100644
--- a/miscutils/taskset.c
+++ b/miscutils/taskset.c
@@ -6,6 +6,24 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define taskset_trivial_usage
+//usage: "[-p] [MASK] [PID | PROG ARGS]"
+//usage:#define taskset_full_usage "\n\n"
+//usage: "Set or get CPU affinity\n"
+//usage: "\nOptions:"
+//usage: "\n -p Operate on an existing PID"
+//usage:
+//usage:#define taskset_example_usage
+//usage: "$ taskset 0x7 ./dgemm_test&\n"
+//usage: "$ taskset -p 0x1 $!\n"
+//usage: "pid 4790's current affinity mask: 7\n"
+//usage: "pid 4790's new affinity mask: 1\n"
+//usage: "$ taskset 0x7 /bin/sh -c './taskset -p 0x1 $$'\n"
+//usage: "pid 6671's current affinity mask: 1\n"
+//usage: "pid 6671's new affinity mask: 1\n"
+//usage: "$ taskset -p 1\n"
+//usage: "pid 1's current affinity mask: 3\n"
+
#include <sched.h>
#include "libbb.h"