File: rmap-locking.h

package info (click to toggle)
linux-kernel-headers 2.5.999-test7-bk-17
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 28,268 kB
  • ctags: 214,024
  • sloc: ansic: 324,929; cpp: 783; makefile: 79; asm: 61; sh: 61
file content (23 lines) | stat: -rw-r--r-- 574 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * include/linux/rmap-locking.h
 *
 * Locking primitives for exclusive access to a page's reverse-mapping
 * pte chain.
 */

#include <linux/slab.h>

struct pte_chain;
extern kmem_cache_t *pte_chain_cache;

#define pte_chain_lock(page)	bit_spin_lock(PG_chainlock, &page->flags)
#define pte_chain_unlock(page)	bit_spin_unlock(PG_chainlock, &page->flags)

struct pte_chain *pte_chain_alloc(int gfp_flags);
void __pte_chain_free(struct pte_chain *pte_chain);

static inline void pte_chain_free(struct pte_chain *pte_chain)
{
	if (pte_chain)
		__pte_chain_free(pte_chain);
}