OSDN Git Service

original
[gb-231r1-is01/Gingerbread_2.3.3_r1_IS01.git] / prebuilt / ndk / android-ndk-r4 / platforms / android-8 / arch-x86 / usr / include / linux / blockgroup_lock.h
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ****************************************************************************
11  ****************************************************************************/
12 #ifndef _LINUX_BLOCKGROUP_LOCK_H
13 #define _LINUX_BLOCKGROUP_LOCK_H
14
15 #include <linux/spinlock.h>
16 #include <linux/cache.h>
17
18 #define NR_BG_LOCKS 1
19
20 struct bgl_lock {
21  spinlock_t lock;
22 } ____cacheline_aligned_in_smp;
23
24 struct blockgroup_lock {
25  struct bgl_lock locks[NR_BG_LOCKS];
26 };
27
28 #define sb_bgl_lock(sb, block_group)   (&(sb)->s_blockgroup_lock.locks[(block_group) & (NR_BG_LOCKS-1)].lock)
29 #endif