| .. | .. |
|---|
| 27 | 27 | return p->flags & PF_FROZEN; |
|---|
| 28 | 28 | } |
|---|
| 29 | 29 | |
|---|
| 30 | +static inline bool frozen_or_skipped(struct task_struct *p) |
|---|
| 31 | +{ |
|---|
| 32 | + return p->flags & (PF_FROZEN | PF_FREEZER_SKIP); |
|---|
| 33 | +} |
|---|
| 34 | + |
|---|
| 30 | 35 | extern bool freezing_slow_path(struct task_struct *p); |
|---|
| 31 | 36 | |
|---|
| 32 | 37 | /* |
|---|
| .. | .. |
|---|
| 207 | 212 | return __retval; |
|---|
| 208 | 213 | } |
|---|
| 209 | 214 | |
|---|
| 215 | +/* DO NOT ADD ANY NEW CALLERS OF THIS FUNCTION */ |
|---|
| 216 | +static inline long freezable_schedule_timeout_interruptible_unsafe(long timeout) |
|---|
| 217 | +{ |
|---|
| 218 | + long __retval; |
|---|
| 219 | + |
|---|
| 220 | + freezer_do_not_count(); |
|---|
| 221 | + __retval = schedule_timeout_interruptible(timeout); |
|---|
| 222 | + freezer_count_unsafe(); |
|---|
| 223 | + return __retval; |
|---|
| 224 | +} |
|---|
| 225 | + |
|---|
| 210 | 226 | /* Like schedule_timeout_killable(), but should not block the freezer. */ |
|---|
| 211 | 227 | static inline long freezable_schedule_timeout_killable(long timeout) |
|---|
| 212 | 228 | { |
|---|
| .. | .. |
|---|
| 259 | 275 | |
|---|
| 260 | 276 | #else /* !CONFIG_FREEZER */ |
|---|
| 261 | 277 | static inline bool frozen(struct task_struct *p) { return false; } |
|---|
| 278 | +static inline bool frozen_or_skipped(struct task_struct *p) { return false; } |
|---|
| 262 | 279 | static inline bool freezing(struct task_struct *p) { return false; } |
|---|
| 263 | 280 | static inline void __thaw_task(struct task_struct *t) {} |
|---|
| 264 | 281 | |
|---|
| .. | .. |
|---|
| 285 | 302 | #define freezable_schedule_timeout_interruptible(timeout) \ |
|---|
| 286 | 303 | schedule_timeout_interruptible(timeout) |
|---|
| 287 | 304 | |
|---|
| 305 | +#define freezable_schedule_timeout_interruptible_unsafe(timeout) \ |
|---|
| 306 | + schedule_timeout_interruptible(timeout) |
|---|
| 307 | + |
|---|
| 288 | 308 | #define freezable_schedule_timeout_killable(timeout) \ |
|---|
| 289 | 309 | schedule_timeout_killable(timeout) |
|---|
| 290 | 310 | |
|---|