Lines 13-27
Link Here
|
13 |
* Linus Torvalds. |
13 |
* Linus Torvalds. |
14 |
*/ |
14 |
*/ |
15 |
|
15 |
|
|
|
16 |
#if defined (__GNUC__) && !defined (__GNUC_STDC_INLINE__) && !defined (__GNUC_GNU_INLINE__) |
17 |
# define __GNUC_GNU_INLINE__ 1 /* GCCs earlier than 4.1.3 don't define this */ |
18 |
#endif |
19 |
#define STORAGE_CLASS extern |
20 |
#if (defined(INCLUDE_INLINE_FUNCS) || !defined(NO_INLINE_FUNCS)) |
21 |
#ifdef INCLUDE_INLINE_FUNCS |
22 |
#define _INLINE_ extern |
23 |
#else |
24 |
#if defined(__GNUC_GNU_INLINE__) |
25 |
#define _INLINE_ extern __inline__ |
26 |
#elif defined(__GNUC_STDC_INLINE__) || \ |
27 |
(defined(__STDC__) && __STDC_VERSION__ >= 199901L) |
28 |
#undef STORAGE_CLASS |
29 |
#define STORAGE_CLASS inline |
30 |
#define _INLINE_ inline |
31 |
#else /* For Watcom C */ |
32 |
#define _INLINE_ extern inline |
33 |
#endif |
34 |
#endif |
16 |
|
35 |
|
17 |
extern int ext2fs_set_bit(unsigned int nr,void * addr); |
36 |
STORAGE_CLASS int ext2fs_set_bit(unsigned int nr,void * addr); |
18 |
extern int ext2fs_clear_bit(unsigned int nr, void * addr); |
37 |
STORAGE_CLASS int ext2fs_clear_bit(unsigned int nr, void * addr); |
19 |
extern int ext2fs_test_bit(unsigned int nr, const void * addr); |
38 |
STORAGE_CLASS int ext2fs_test_bit(unsigned int nr, const void * addr); |
20 |
extern void ext2fs_fast_set_bit(unsigned int nr,void * addr); |
39 |
STORAGE_CLASS void ext2fs_fast_set_bit(unsigned int nr,void * addr); |
21 |
extern void ext2fs_fast_clear_bit(unsigned int nr, void * addr); |
40 |
STORAGE_CLASS void ext2fs_fast_clear_bit(unsigned int nr, void * addr); |
22 |
extern __u16 ext2fs_swab16(__u16 val); |
41 |
STORAGE_CLASS __u16 ext2fs_swab16(__u16 val); |
23 |
extern __u32 ext2fs_swab32(__u32 val); |
42 |
STORAGE_CLASS __u32 ext2fs_swab32(__u32 val); |
24 |
extern __u64 ext2fs_swab64(__u64 val); |
43 |
STORAGE_CLASS __u64 ext2fs_swab64(__u64 val); |
25 |
|
44 |
|
26 |
#ifdef WORDS_BIGENDIAN |
45 |
#ifdef WORDS_BIGENDIAN |
27 |
#define ext2fs_cpu_to_le64(x) ext2fs_swab64((x)) |
46 |
#define ext2fs_cpu_to_le64(x) ext2fs_swab64((x)) |
Lines 62-122
extern void ext2fs_warn_bitmap(errcode_t errcode, unsigned long arg,
Link Here
|
62 |
extern void ext2fs_warn_bitmap2(ext2fs_generic_bitmap bitmap, |
81 |
extern void ext2fs_warn_bitmap2(ext2fs_generic_bitmap bitmap, |
63 |
int code, unsigned long arg); |
82 |
int code, unsigned long arg); |
64 |
|
83 |
|
65 |
extern int ext2fs_mark_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block); |
84 |
STORAGE_CLASS int ext2fs_mark_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block); |
66 |
extern int ext2fs_unmark_block_bitmap(ext2fs_block_bitmap bitmap, |
85 |
STORAGE_CLASS int ext2fs_unmark_block_bitmap(ext2fs_block_bitmap bitmap, |
67 |
blk_t block); |
86 |
blk_t block); |
68 |
extern int ext2fs_test_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block); |
87 |
STORAGE_CLASS int ext2fs_test_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block); |
69 |
|
88 |
|
70 |
extern int ext2fs_mark_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode); |
89 |
STORAGE_CLASS int ext2fs_mark_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode); |
71 |
extern int ext2fs_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap, |
90 |
STORAGE_CLASS int ext2fs_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap, |
72 |
ext2_ino_t inode); |
91 |
ext2_ino_t inode); |
73 |
extern int ext2fs_test_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode); |
92 |
STORAGE_CLASS int ext2fs_test_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode); |
74 |
|
93 |
|
75 |
extern void ext2fs_fast_mark_block_bitmap(ext2fs_block_bitmap bitmap, |
94 |
STORAGE_CLASS void ext2fs_fast_mark_block_bitmap(ext2fs_block_bitmap bitmap, |
76 |
blk_t block); |
95 |
blk_t block); |
77 |
extern void ext2fs_fast_unmark_block_bitmap(ext2fs_block_bitmap bitmap, |
96 |
STORAGE_CLASS void ext2fs_fast_unmark_block_bitmap(ext2fs_block_bitmap bitmap, |
78 |
blk_t block); |
97 |
blk_t block); |
79 |
extern int ext2fs_fast_test_block_bitmap(ext2fs_block_bitmap bitmap, |
98 |
STORAGE_CLASS int ext2fs_fast_test_block_bitmap(ext2fs_block_bitmap bitmap, |
80 |
blk_t block); |
99 |
blk_t block); |
81 |
|
100 |
|
82 |
extern void ext2fs_fast_mark_inode_bitmap(ext2fs_inode_bitmap bitmap, |
101 |
STORAGE_CLASS void ext2fs_fast_mark_inode_bitmap(ext2fs_inode_bitmap bitmap, |
83 |
ext2_ino_t inode); |
102 |
ext2_ino_t inode); |
84 |
extern void ext2fs_fast_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap, |
103 |
STORAGE_CLASS void ext2fs_fast_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap, |
85 |
ext2_ino_t inode); |
104 |
ext2_ino_t inode); |
86 |
extern int ext2fs_fast_test_inode_bitmap(ext2fs_inode_bitmap bitmap, |
105 |
STORAGE_CLASS int ext2fs_fast_test_inode_bitmap(ext2fs_inode_bitmap bitmap, |
87 |
ext2_ino_t inode); |
106 |
ext2_ino_t inode); |
88 |
extern blk_t ext2fs_get_block_bitmap_start(ext2fs_block_bitmap bitmap); |
107 |
STORAGE_CLASS blk_t ext2fs_get_block_bitmap_start(ext2fs_block_bitmap bitmap); |
89 |
extern ext2_ino_t ext2fs_get_inode_bitmap_start(ext2fs_inode_bitmap bitmap); |
108 |
STORAGE_CLASS ext2_ino_t ext2fs_get_inode_bitmap_start(ext2fs_inode_bitmap bitmap); |
90 |
extern blk_t ext2fs_get_block_bitmap_end(ext2fs_block_bitmap bitmap); |
109 |
STORAGE_CLASS blk_t ext2fs_get_block_bitmap_end(ext2fs_block_bitmap bitmap); |
91 |
extern ext2_ino_t ext2fs_get_inode_bitmap_end(ext2fs_inode_bitmap bitmap); |
110 |
STORAGE_CLASS ext2_ino_t ext2fs_get_inode_bitmap_end(ext2fs_inode_bitmap bitmap); |
92 |
|
111 |
|
93 |
extern void ext2fs_mark_block_bitmap_range(ext2fs_block_bitmap bitmap, |
112 |
STORAGE_CLASS void ext2fs_mark_block_bitmap_range(ext2fs_block_bitmap bitmap, |
94 |
blk_t block, int num); |
113 |
blk_t block, int num); |
95 |
extern void ext2fs_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap, |
114 |
STORAGE_CLASS void ext2fs_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap, |
96 |
blk_t block, int num); |
115 |
blk_t block, int num); |
97 |
extern int ext2fs_test_block_bitmap_range(ext2fs_block_bitmap bitmap, |
116 |
STORAGE_CLASS int ext2fs_test_block_bitmap_range(ext2fs_block_bitmap bitmap, |
98 |
blk_t block, int num); |
117 |
blk_t block, int num); |
99 |
extern int ext2fs_test_inode_bitmap_range(ext2fs_inode_bitmap bitmap, |
118 |
STORAGE_CLASS int ext2fs_test_inode_bitmap_range(ext2fs_inode_bitmap bitmap, |
100 |
ino_t inode, int num); |
119 |
ino_t inode, int num); |
101 |
extern void ext2fs_fast_mark_block_bitmap_range(ext2fs_block_bitmap bitmap, |
120 |
STORAGE_CLASS void ext2fs_fast_mark_block_bitmap_range(ext2fs_block_bitmap bitmap, |
102 |
blk_t block, int num); |
121 |
blk_t block, int num); |
103 |
extern void ext2fs_fast_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap, |
122 |
STORAGE_CLASS void ext2fs_fast_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap, |
104 |
blk_t block, int num); |
123 |
blk_t block, int num); |
105 |
extern int ext2fs_fast_test_block_bitmap_range(ext2fs_block_bitmap bitmap, |
124 |
STORAGE_CLASS int ext2fs_fast_test_block_bitmap_range(ext2fs_block_bitmap bitmap, |
106 |
blk_t block, int num); |
125 |
blk_t block, int num); |
107 |
extern void ext2fs_set_bitmap_padding(ext2fs_generic_bitmap map); |
126 |
STORAGE_CLASS void ext2fs_set_bitmap_padding(ext2fs_generic_bitmap map); |
108 |
|
127 |
|
109 |
/* These routines moved to gen_bitmap.c */ |
128 |
/* These routines moved to gen_bitmap.c */ |
110 |
extern int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap, |
129 |
STORAGE_CLASS int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap, |
111 |
__u32 bitno); |
130 |
__u32 bitno); |
112 |
extern int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap, |
131 |
STORAGE_CLASS int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap, |
113 |
blk_t bitno); |
132 |
blk_t bitno); |
114 |
extern int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap, |
133 |
STORAGE_CLASS int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap, |
115 |
blk_t bitno); |
134 |
blk_t bitno); |
116 |
extern int ext2fs_test_block_bitmap_range(ext2fs_block_bitmap bitmap, |
135 |
STORAGE_CLASS int ext2fs_test_block_bitmap_range(ext2fs_block_bitmap bitmap, |
117 |
blk_t block, int num); |
136 |
blk_t block, int num); |
118 |
extern __u32 ext2fs_get_generic_bitmap_start(ext2fs_generic_bitmap bitmap); |
137 |
STORAGE_CLASS __u32 ext2fs_get_generic_bitmap_start(ext2fs_generic_bitmap bitmap); |
119 |
extern __u32 ext2fs_get_generic_bitmap_end(ext2fs_generic_bitmap bitmap); |
138 |
STORAGE_CLASS __u32 ext2fs_get_generic_bitmap_end(ext2fs_generic_bitmap bitmap); |
120 |
|
139 |
|
121 |
/* |
140 |
/* |
122 |
* The inline routines themselves... |
141 |
* The inline routines themselves... |
Lines 134-150
extern __u32 ext2fs_get_generic_bitmap_end(ext2fs_generic_bitmap bitmap);
Link Here
|
134 |
#endif |
153 |
#endif |
135 |
#endif /* NO_INLINE_FUNCS */ |
154 |
#endif /* NO_INLINE_FUNCS */ |
136 |
|
155 |
|
137 |
#if (defined(INCLUDE_INLINE_FUNCS) || !defined(NO_INLINE_FUNCS)) |
|
|
138 |
#ifdef INCLUDE_INLINE_FUNCS |
139 |
#define _INLINE_ extern |
140 |
#else |
141 |
#ifdef __GNUC__ |
142 |
#define _INLINE_ extern __inline__ |
143 |
#else /* For Watcom C */ |
144 |
#define _INLINE_ extern inline |
145 |
#endif |
146 |
#endif |
147 |
|
148 |
/* |
156 |
/* |
149 |
* Fast bit set/clear functions that doesn't need to return the |
157 |
* Fast bit set/clear functions that doesn't need to return the |
150 |
* previous bit value. |
158 |
* previous bit value. |
Lines 423-428
_INLINE_ void ext2fs_fast_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap,
Link Here
|
423 |
{ |
431 |
{ |
424 |
ext2fs_unmark_block_bitmap_range(bitmap, block, num); |
432 |
ext2fs_unmark_block_bitmap_range(bitmap, block, num); |
425 |
} |
433 |
} |
|
|
434 |
|
435 |
#undef STORAGE_CLASS |
426 |
#undef _INLINE_ |
436 |
#undef _INLINE_ |
427 |
#endif |
437 |
#endif |
428 |
|
|
|