btreplay: fix sched_{set|get}affinity
authorRoman Pen <r.peniaev@gmail.com>
Sat, 23 Apr 2016 11:44:09 +0000 (13:44 +0200)
committerJens Axboe <axboe@fb.com>
Mon, 25 Apr 2016 14:53:18 +0000 (08:53 -0600)
commit7338236ab386515bbcecf5c05bca6a034c12d0b9
tree461034e37be148ddd0a8ef0676b4a7b0635eb5dd
parentf6541f75f2822252b057f08e9f5f0c40d4079a8c
btreplay: fix sched_{set|get}affinity

getpid() is a pid of a process, at least tid must be provided.
But if zero is passed, then calling thread will be used.
That exactly what is needed.

Signed-off-by: Roman Pen <r.peniaev@gmail.com>
Cc: Jens Axboe <axboe@fb.com>
Cc: <linux-btrace@vger.kernel.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
btreplay/btreplay.c