• Home
  • Raw
  • Download

Lines Matching refs:freezer

30 struct freezer {  struct
36 static inline struct freezer *cgroup_freezer( in cgroup_freezer() argument
41 struct freezer, css); in cgroup_freezer()
44 static inline struct freezer *task_freezer(struct task_struct *task) in task_freezer()
47 struct freezer, css); in task_freezer()
52 struct freezer *freezer; in cgroup_frozen() local
56 freezer = task_freezer(task); in cgroup_frozen()
57 state = freezer->state; in cgroup_frozen()
131 struct freezer *freezer; in freezer_create() local
133 freezer = kzalloc(sizeof(struct freezer), GFP_KERNEL); in freezer_create()
134 if (!freezer) in freezer_create()
137 spin_lock_init(&freezer->lock); in freezer_create()
138 freezer->state = CGROUP_THAWED; in freezer_create()
139 return &freezer->css; in freezer_create()
164 struct freezer *freezer; in freezer_can_attach() local
184 freezer = cgroup_freezer(new_cgroup); in freezer_can_attach()
185 if (freezer->state == CGROUP_FROZEN) in freezer_can_attach()
193 struct freezer *freezer; in freezer_fork() local
201 freezer = task_freezer(task); in freezer_fork()
207 if (!freezer->css.cgroup->parent) in freezer_fork()
210 spin_lock_irq(&freezer->lock); in freezer_fork()
211 BUG_ON(freezer->state == CGROUP_FROZEN); in freezer_fork()
214 if (freezer->state == CGROUP_FREEZING) in freezer_fork()
216 spin_unlock_irq(&freezer->lock); in freezer_fork()
223 struct freezer *freezer) in update_freezer_state() argument
242 freezer->state = CGROUP_FROZEN; in update_freezer_state()
244 freezer->state = CGROUP_FREEZING; in update_freezer_state()
246 freezer->state = CGROUP_THAWED; in update_freezer_state()
253 struct freezer *freezer; in freezer_read() local
259 freezer = cgroup_freezer(cgroup); in freezer_read()
260 spin_lock_irq(&freezer->lock); in freezer_read()
261 state = freezer->state; in freezer_read()
265 update_freezer_state(cgroup, freezer); in freezer_read()
266 state = freezer->state; in freezer_read()
268 spin_unlock_irq(&freezer->lock); in freezer_read()
276 static int try_to_freeze_cgroup(struct cgroup *cgroup, struct freezer *freezer) in try_to_freeze_cgroup() argument
282 freezer->state = CGROUP_FREEZING; in try_to_freeze_cgroup()
297 static void unfreeze_cgroup(struct cgroup *cgroup, struct freezer *freezer) in unfreeze_cgroup() argument
308 freezer->state = CGROUP_THAWED; in unfreeze_cgroup()
314 struct freezer *freezer; in freezer_change_state() local
317 freezer = cgroup_freezer(cgroup); in freezer_change_state()
319 spin_lock_irq(&freezer->lock); in freezer_change_state()
321 update_freezer_state(cgroup, freezer); in freezer_change_state()
322 if (goal_state == freezer->state) in freezer_change_state()
327 unfreeze_cgroup(cgroup, freezer); in freezer_change_state()
330 retval = try_to_freeze_cgroup(cgroup, freezer); in freezer_change_state()
336 spin_unlock_irq(&freezer->lock); in freezer_change_state()