lkml.org 
[lkml]   [2005]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: return value of ptep_get_and_clear
Kumar Gala wrote:
> ptep_get_and_clear has a signature that looks something like:
>
> static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned
> long addr,
> pte_t *ptep)
>
> It appears that its suppose to return the pte_t pointed to by ptep
> before its modified. Why do we bother doing this? The caller seems
> perfectly able to dereference ptep and hold on to it. Am I missing
> something here?
>

You need to be able to *atomically* clear the pte and retrieve the
old value.

Nick

--
SUSE Labs, Novell Inc.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-06 18:52    [W:0.034 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site