提交 21498223 编写于 作者: M Matthew Wilcox 提交者: Matthew Wilcox

perfmon: Use task_is_*

Signed-off-by: NMatthew Wilcox <willy@linux.intel.com>
上级 92a1f4bc
......@@ -2631,7 +2631,7 @@ pfm_task_incompatible(pfm_context_t *ctx, struct task_struct *task)
*/
if (task == current) return 0;
if ((task->state != TASK_STOPPED) && (task->state != TASK_TRACED)) {
if (!task_is_stopped_or_traced(task)) {
DPRINT(("cannot attach to non-stopped task [%d] state=%ld\n", task_pid_nr(task), task->state));
return -EBUSY;
}
......@@ -4792,7 +4792,7 @@ pfm_check_task_state(pfm_context_t *ctx, int cmd, unsigned long flags)
* the task must be stopped.
*/
if (PFM_CMD_STOPPED(cmd)) {
if ((task->state != TASK_STOPPED) && (task->state != TASK_TRACED)) {
if (!task_is_stopped_or_traced(task)) {
DPRINT(("[%d] task not in stopped state\n", task_pid_nr(task)));
return -EBUSY;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册