lkml.org 
[lkml]   [2011]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] PM / Sleep: Make [un]lock_system_sleep() generic
Hello,

On Mon, Dec 05, 2011 at 01:32:38AM +0530, Srivatsa S. Bhat wrote:
> +static inline void lock_system_sleep(void)
> +{
> + /* simplified freezer_do_not_count() */
> + current->flags |= PF_FREEZER_SKIP;
> + mutex_lock(&pm_mutex);
> +}
> +
> +static inline void unlock_system_sleep(void)
> +{
> + mutex_unlock(&pm_mutex);
> + /* simplified freezer_count() */
> + current->flags &= ~PF_FREEZER_SKIP;
> +}

BTW, don't we want try_to_freeze() there? What's the reason for not
using freezer_count()?

Thanks.

--
tejun


\
 
 \ /
  Last update: 2011-12-05 18:17    [W:0.293 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site