Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56867
b: refs/heads/master
c: 88f18ba
h: refs/heads/master
i:
  56865: 7950186
  56863: 7ac0d8f
v: v3
  • Loading branch information
Gautham R Shenoy authored and Linus Torvalds committed May 24, 2007
1 parent 0e4fbc9 commit 73de9cb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5fcc57f2d5d558056668159f9153bf21d2c53d16
refs/heads/master: 88f18ba028b5939bb6f77bd690e5ad8d01bb24cc
13 changes: 0 additions & 13 deletions trunk/include/linux/freezer.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,6 @@ static inline int thaw_process(struct task_struct *p)
return 0;
}

/*
* freezing is complete, mark process as frozen
*/
static inline void frozen_process(struct task_struct *p)
{
if (!unlikely(p->flags & PF_NOFREEZE)) {
p->flags |= PF_FROZEN;
wmb();
}
clear_tsk_thread_flag(p, TIF_FREEZE);
}

extern void refrigerator(void);
extern int freeze_processes(void);
extern void thaw_processes(void);
Expand Down Expand Up @@ -132,7 +120,6 @@ static inline int frozen(struct task_struct *p) { return 0; }
static inline int freezing(struct task_struct *p) { return 0; }
static inline void freeze(struct task_struct *p) { BUG(); }
static inline int thaw_process(struct task_struct *p) { return 1; }
static inline void frozen_process(struct task_struct *p) { BUG(); }

static inline void refrigerator(void) {}
static inline int freeze_processes(void) { BUG(); return 0; }
Expand Down
14 changes: 13 additions & 1 deletion trunk/kernel/power/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ static inline int freezeable(struct task_struct * p)
return 1;
}

/*
* freezing is complete, mark current process as frozen
*/
static inline void frozen_process(void)
{
if (!unlikely(current->flags & PF_NOFREEZE)) {
current->flags |= PF_FROZEN;
wmb();
}
clear_tsk_thread_flag(current, TIF_FREEZE);
}

/* Refrigerator is place where frozen processes are stored :-). */
void refrigerator(void)
{
Expand All @@ -40,7 +52,7 @@ void refrigerator(void)

task_lock(current);
if (freezing(current)) {
frozen_process(current);
frozen_process();
task_unlock(current);
} else {
task_unlock(current);
Expand Down

0 comments on commit 73de9cb

Please sign in to comment.