linux/include/linux/sched/jobctl.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_SCHED_JOBCTL_H
#define _LINUX_SCHED_JOBCTL_H

#include <linux/types.h>

struct task_struct;

/*
 * task->jobctl flags
 */
#define JOBCTL_STOP_SIGMASK

#define JOBCTL_STOP_DEQUEUED_BIT
#define JOBCTL_STOP_PENDING_BIT
#define JOBCTL_STOP_CONSUME_BIT
#define JOBCTL_TRAP_STOP_BIT
#define JOBCTL_TRAP_NOTIFY_BIT
#define JOBCTL_TRAPPING_BIT
#define JOBCTL_LISTENING_BIT
#define JOBCTL_TRAP_FREEZE_BIT
#define JOBCTL_PTRACE_FROZEN_BIT

#define JOBCTL_STOPPED_BIT
#define JOBCTL_TRACED_BIT

#define JOBCTL_STOP_DEQUEUED
#define JOBCTL_STOP_PENDING
#define JOBCTL_STOP_CONSUME
#define JOBCTL_TRAP_STOP
#define JOBCTL_TRAP_NOTIFY
#define JOBCTL_TRAPPING
#define JOBCTL_LISTENING
#define JOBCTL_TRAP_FREEZE
#define JOBCTL_PTRACE_FROZEN

#define JOBCTL_STOPPED
#define JOBCTL_TRACED

#define JOBCTL_TRAP_MASK
#define JOBCTL_PENDING_MASK

extern bool task_set_jobctl_pending(struct task_struct *task, unsigned long mask);
extern void task_clear_jobctl_trapping(struct task_struct *task);
extern void task_clear_jobctl_pending(struct task_struct *task, unsigned long mask);

#endif /* _LINUX_SCHED_JOBCTL_H */