Skip to content
Snippets Groups Projects
Commit ee940d8d authored by Mike Frysinger's avatar Mike Frysinger Committed by Rafael J. Wysocki
Browse files

Freezer: Use SMP barriers


The freezer processes are dealing with multiple threads running
simultaneously, and on a UP system, the memory reads/writes do
not need barriers to keep things in sync.  These are only needed
on SMP systems, so use SMP barriers instead.

Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
parent 3c431936
Branches
Tags
No related merge requests found
......@@ -17,7 +17,7 @@ static inline void frozen_process(void)
{
if (!unlikely(current->flags & PF_NOFREEZE)) {
current->flags |= PF_FROZEN;
wmb();
smp_wmb();
}
clear_freeze_flag(current);
}
......@@ -93,7 +93,7 @@ bool freeze_task(struct task_struct *p, bool sig_only)
* the task as frozen and next clears its TIF_FREEZE.
*/
if (!freezing(p)) {
rmb();
smp_rmb();
if (frozen(p))
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment