On Sun, Apr 29, 2007 at 07:51:04PM +0200, Rafael J. Wysocki wrote:
No problems! Even I was out for the weekend.
Agreed. Will do that.
Ok.
I was wondering if the statement
if (process_frozen_event_mask(p) & ~current_freezer_event)
return 0;
would be readable in the first place!
Yeah, we can do what you have suggested.
Right! So we would need one more label. How about the following?
mutex_lock(&freezer_mutex);
/* check if already frozen for the event */
if (system_frozen_event_mask & freeze_event)
goto out_frozen;
.
.
.
out_frozen:
BUG_ON(in_atomic());
out:
current_freezer_event = 0;
mutex_unlock(&freezer_mutex);
return nr_unfrozen;
}
Well, yes. But I put the warn on from the perspective of someone trying
to thaw_processes for the event for which they have not frozen. I hadn't
thought about a double thaw. Will rethink.
Thanks for the Review.
Regards
gautham.
--
Gautham R Shenoy
Linux Technology Center
IBM India.
"Freedom comes with a price tag of responsibility, which is still a bargain,
because Freedom is priceless!"
-