1fea25720SGraeme Russ #ifndef _I386_BITOPS_H
2fea25720SGraeme Russ #define _I386_BITOPS_H
3fea25720SGraeme Russ
4fea25720SGraeme Russ /*
5fea25720SGraeme Russ * Copyright 1992, Linus Torvalds.
6fea25720SGraeme Russ */
7fea25720SGraeme Russ
8fea25720SGraeme Russ
9fea25720SGraeme Russ /*
10fea25720SGraeme Russ * These have to be done with inline assembly: that way the bit-setting
11fea25720SGraeme Russ * is guaranteed to be atomic. All bit operations return 0 if the bit
12fea25720SGraeme Russ * was cleared before the operation and != 0 if it was not.
13fea25720SGraeme Russ *
14fea25720SGraeme Russ * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
15fea25720SGraeme Russ */
16fea25720SGraeme Russ
176c2f758cSFabio Estevam #include <asm-generic/bitops/fls.h>
186c2f758cSFabio Estevam #include <asm-generic/bitops/__fls.h>
196c2f758cSFabio Estevam #include <asm-generic/bitops/fls64.h>
206c2f758cSFabio Estevam
21fea25720SGraeme Russ #ifdef CONFIG_SMP
22fea25720SGraeme Russ #define LOCK_PREFIX "lock ; "
23fea25720SGraeme Russ #else
24fea25720SGraeme Russ #define LOCK_PREFIX ""
25fea25720SGraeme Russ #endif
26fea25720SGraeme Russ
27fea25720SGraeme Russ #define ADDR (*(volatile long *) addr)
28fea25720SGraeme Russ
29fea25720SGraeme Russ /**
30fea25720SGraeme Russ * set_bit - Atomically set a bit in memory
31fea25720SGraeme Russ * @nr: the bit to set
32fea25720SGraeme Russ * @addr: the address to start counting from
33fea25720SGraeme Russ *
34fea25720SGraeme Russ * This function is atomic and may not be reordered. See __set_bit()
35fea25720SGraeme Russ * if you do not require the atomic guarantees.
36fea25720SGraeme Russ * Note that @nr may be almost arbitrarily large; this function is not
37fea25720SGraeme Russ * restricted to acting on a single-word quantity.
38fea25720SGraeme Russ */
set_bit(int nr,volatile void * addr)39fea25720SGraeme Russ static __inline__ void set_bit(int nr, volatile void * addr)
40fea25720SGraeme Russ {
41fea25720SGraeme Russ __asm__ __volatile__( LOCK_PREFIX
42fea25720SGraeme Russ "btsl %1,%0"
43fea25720SGraeme Russ :"=m" (ADDR)
44fea25720SGraeme Russ :"Ir" (nr));
45fea25720SGraeme Russ }
46fea25720SGraeme Russ
47fea25720SGraeme Russ /**
48fea25720SGraeme Russ * __set_bit - Set a bit in memory
49fea25720SGraeme Russ * @nr: the bit to set
50fea25720SGraeme Russ * @addr: the address to start counting from
51fea25720SGraeme Russ *
52fea25720SGraeme Russ * Unlike set_bit(), this function is non-atomic and may be reordered.
53fea25720SGraeme Russ * If it's called on the same region of memory simultaneously, the effect
54fea25720SGraeme Russ * may be that only one operation succeeds.
55fea25720SGraeme Russ */
__set_bit(int nr,volatile void * addr)56fea25720SGraeme Russ static __inline__ void __set_bit(int nr, volatile void * addr)
57fea25720SGraeme Russ {
58fea25720SGraeme Russ __asm__(
59fea25720SGraeme Russ "btsl %1,%0"
60fea25720SGraeme Russ :"=m" (ADDR)
61fea25720SGraeme Russ :"Ir" (nr));
62fea25720SGraeme Russ }
63fea25720SGraeme Russ
64*30fe8b05SBryan O'Donoghue #define PLATFORM__SET_BIT
65*30fe8b05SBryan O'Donoghue
66fea25720SGraeme Russ /**
67fea25720SGraeme Russ * clear_bit - Clears a bit in memory
68fea25720SGraeme Russ * @nr: Bit to clear
69fea25720SGraeme Russ * @addr: Address to start counting from
70fea25720SGraeme Russ *
71fea25720SGraeme Russ * clear_bit() is atomic and may not be reordered. However, it does
72fea25720SGraeme Russ * not contain a memory barrier, so if it is used for locking purposes,
73fea25720SGraeme Russ * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit()
74fea25720SGraeme Russ * in order to ensure changes are visible on other processors.
75fea25720SGraeme Russ */
clear_bit(int nr,volatile void * addr)76fea25720SGraeme Russ static __inline__ void clear_bit(int nr, volatile void * addr)
77fea25720SGraeme Russ {
78fea25720SGraeme Russ __asm__ __volatile__( LOCK_PREFIX
79fea25720SGraeme Russ "btrl %1,%0"
80fea25720SGraeme Russ :"=m" (ADDR)
81fea25720SGraeme Russ :"Ir" (nr));
82fea25720SGraeme Russ }
83fea25720SGraeme Russ #define smp_mb__before_clear_bit() barrier()
84fea25720SGraeme Russ #define smp_mb__after_clear_bit() barrier()
85fea25720SGraeme Russ
86fea25720SGraeme Russ /**
87fea25720SGraeme Russ * __change_bit - Toggle a bit in memory
88fea25720SGraeme Russ * @nr: the bit to set
89fea25720SGraeme Russ * @addr: the address to start counting from
90fea25720SGraeme Russ *
91fea25720SGraeme Russ * Unlike change_bit(), this function is non-atomic and may be reordered.
92fea25720SGraeme Russ * If it's called on the same region of memory simultaneously, the effect
93fea25720SGraeme Russ * may be that only one operation succeeds.
94fea25720SGraeme Russ */
__change_bit(int nr,volatile void * addr)95fea25720SGraeme Russ static __inline__ void __change_bit(int nr, volatile void * addr)
96fea25720SGraeme Russ {
97fea25720SGraeme Russ __asm__ __volatile__(
98fea25720SGraeme Russ "btcl %1,%0"
99fea25720SGraeme Russ :"=m" (ADDR)
100fea25720SGraeme Russ :"Ir" (nr));
101fea25720SGraeme Russ }
102fea25720SGraeme Russ
103fea25720SGraeme Russ /**
104fea25720SGraeme Russ * change_bit - Toggle a bit in memory
105fea25720SGraeme Russ * @nr: Bit to clear
106fea25720SGraeme Russ * @addr: Address to start counting from
107fea25720SGraeme Russ *
108fea25720SGraeme Russ * change_bit() is atomic and may not be reordered.
109fea25720SGraeme Russ * Note that @nr may be almost arbitrarily large; this function is not
110fea25720SGraeme Russ * restricted to acting on a single-word quantity.
111fea25720SGraeme Russ */
change_bit(int nr,volatile void * addr)112fea25720SGraeme Russ static __inline__ void change_bit(int nr, volatile void * addr)
113fea25720SGraeme Russ {
114fea25720SGraeme Russ __asm__ __volatile__( LOCK_PREFIX
115fea25720SGraeme Russ "btcl %1,%0"
116fea25720SGraeme Russ :"=m" (ADDR)
117fea25720SGraeme Russ :"Ir" (nr));
118fea25720SGraeme Russ }
119fea25720SGraeme Russ
120fea25720SGraeme Russ /**
121fea25720SGraeme Russ * test_and_set_bit - Set a bit and return its old value
122fea25720SGraeme Russ * @nr: Bit to set
123fea25720SGraeme Russ * @addr: Address to count from
124fea25720SGraeme Russ *
125fea25720SGraeme Russ * This operation is atomic and cannot be reordered.
126fea25720SGraeme Russ * It also implies a memory barrier.
127fea25720SGraeme Russ */
test_and_set_bit(int nr,volatile void * addr)128fea25720SGraeme Russ static __inline__ int test_and_set_bit(int nr, volatile void * addr)
129fea25720SGraeme Russ {
130fea25720SGraeme Russ int oldbit;
131fea25720SGraeme Russ
132fea25720SGraeme Russ __asm__ __volatile__( LOCK_PREFIX
133fea25720SGraeme Russ "btsl %2,%1\n\tsbbl %0,%0"
134fea25720SGraeme Russ :"=r" (oldbit),"=m" (ADDR)
135fea25720SGraeme Russ :"Ir" (nr) : "memory");
136fea25720SGraeme Russ return oldbit;
137fea25720SGraeme Russ }
138fea25720SGraeme Russ
139fea25720SGraeme Russ /**
140fea25720SGraeme Russ * __test_and_set_bit - Set a bit and return its old value
141fea25720SGraeme Russ * @nr: Bit to set
142fea25720SGraeme Russ * @addr: Address to count from
143fea25720SGraeme Russ *
144fea25720SGraeme Russ * This operation is non-atomic and can be reordered.
145fea25720SGraeme Russ * If two examples of this operation race, one can appear to succeed
146fea25720SGraeme Russ * but actually fail. You must protect multiple accesses with a lock.
147fea25720SGraeme Russ */
__test_and_set_bit(int nr,volatile void * addr)148fea25720SGraeme Russ static __inline__ int __test_and_set_bit(int nr, volatile void * addr)
149fea25720SGraeme Russ {
150fea25720SGraeme Russ int oldbit;
151fea25720SGraeme Russ
152fea25720SGraeme Russ __asm__(
153fea25720SGraeme Russ "btsl %2,%1\n\tsbbl %0,%0"
154fea25720SGraeme Russ :"=r" (oldbit),"=m" (ADDR)
155fea25720SGraeme Russ :"Ir" (nr));
156fea25720SGraeme Russ return oldbit;
157fea25720SGraeme Russ }
158fea25720SGraeme Russ
159fea25720SGraeme Russ /**
160fea25720SGraeme Russ * test_and_clear_bit - Clear a bit and return its old value
161fea25720SGraeme Russ * @nr: Bit to set
162fea25720SGraeme Russ * @addr: Address to count from
163fea25720SGraeme Russ *
164fea25720SGraeme Russ * This operation is atomic and cannot be reordered.
165fea25720SGraeme Russ * It also implies a memory barrier.
166fea25720SGraeme Russ */
test_and_clear_bit(int nr,volatile void * addr)167fea25720SGraeme Russ static __inline__ int test_and_clear_bit(int nr, volatile void * addr)
168fea25720SGraeme Russ {
169fea25720SGraeme Russ int oldbit;
170fea25720SGraeme Russ
171fea25720SGraeme Russ __asm__ __volatile__( LOCK_PREFIX
172fea25720SGraeme Russ "btrl %2,%1\n\tsbbl %0,%0"
173fea25720SGraeme Russ :"=r" (oldbit),"=m" (ADDR)
174fea25720SGraeme Russ :"Ir" (nr) : "memory");
175fea25720SGraeme Russ return oldbit;
176fea25720SGraeme Russ }
177fea25720SGraeme Russ
178fea25720SGraeme Russ /**
179fea25720SGraeme Russ * __test_and_clear_bit - Clear a bit and return its old value
180fea25720SGraeme Russ * @nr: Bit to set
181fea25720SGraeme Russ * @addr: Address to count from
182fea25720SGraeme Russ *
183fea25720SGraeme Russ * This operation is non-atomic and can be reordered.
184fea25720SGraeme Russ * If two examples of this operation race, one can appear to succeed
185fea25720SGraeme Russ * but actually fail. You must protect multiple accesses with a lock.
186fea25720SGraeme Russ */
__test_and_clear_bit(int nr,volatile void * addr)187fea25720SGraeme Russ static __inline__ int __test_and_clear_bit(int nr, volatile void * addr)
188fea25720SGraeme Russ {
189fea25720SGraeme Russ int oldbit;
190fea25720SGraeme Russ
191fea25720SGraeme Russ __asm__(
192fea25720SGraeme Russ "btrl %2,%1\n\tsbbl %0,%0"
193fea25720SGraeme Russ :"=r" (oldbit),"=m" (ADDR)
194fea25720SGraeme Russ :"Ir" (nr));
195fea25720SGraeme Russ return oldbit;
196fea25720SGraeme Russ }
197fea25720SGraeme Russ
198fea25720SGraeme Russ /* WARNING: non atomic and it can be reordered! */
__test_and_change_bit(int nr,volatile void * addr)199fea25720SGraeme Russ static __inline__ int __test_and_change_bit(int nr, volatile void * addr)
200fea25720SGraeme Russ {
201fea25720SGraeme Russ int oldbit;
202fea25720SGraeme Russ
203fea25720SGraeme Russ __asm__ __volatile__(
204fea25720SGraeme Russ "btcl %2,%1\n\tsbbl %0,%0"
205fea25720SGraeme Russ :"=r" (oldbit),"=m" (ADDR)
206fea25720SGraeme Russ :"Ir" (nr) : "memory");
207fea25720SGraeme Russ return oldbit;
208fea25720SGraeme Russ }
209fea25720SGraeme Russ
210fea25720SGraeme Russ /**
211fea25720SGraeme Russ * test_and_change_bit - Change a bit and return its new value
212fea25720SGraeme Russ * @nr: Bit to set
213fea25720SGraeme Russ * @addr: Address to count from
214fea25720SGraeme Russ *
215fea25720SGraeme Russ * This operation is atomic and cannot be reordered.
216fea25720SGraeme Russ * It also implies a memory barrier.
217fea25720SGraeme Russ */
test_and_change_bit(int nr,volatile void * addr)218fea25720SGraeme Russ static __inline__ int test_and_change_bit(int nr, volatile void * addr)
219fea25720SGraeme Russ {
220fea25720SGraeme Russ int oldbit;
221fea25720SGraeme Russ
222fea25720SGraeme Russ __asm__ __volatile__( LOCK_PREFIX
223fea25720SGraeme Russ "btcl %2,%1\n\tsbbl %0,%0"
224fea25720SGraeme Russ :"=r" (oldbit),"=m" (ADDR)
225fea25720SGraeme Russ :"Ir" (nr) : "memory");
226fea25720SGraeme Russ return oldbit;
227fea25720SGraeme Russ }
228fea25720SGraeme Russ
229fea25720SGraeme Russ #if 0 /* Fool kernel-doc since it doesn't do macros yet */
230fea25720SGraeme Russ /**
231fea25720SGraeme Russ * test_bit - Determine whether a bit is set
232fea25720SGraeme Russ * @nr: bit number to test
233fea25720SGraeme Russ * @addr: Address to start counting from
234fea25720SGraeme Russ */
235fea25720SGraeme Russ static int test_bit(int nr, const volatile void * addr);
236fea25720SGraeme Russ #endif
237fea25720SGraeme Russ
constant_test_bit(int nr,const volatile void * addr)238fea25720SGraeme Russ static __inline__ int constant_test_bit(int nr, const volatile void * addr)
239fea25720SGraeme Russ {
240fea25720SGraeme Russ return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0;
241fea25720SGraeme Russ }
242fea25720SGraeme Russ
variable_test_bit(int nr,volatile void * addr)243fea25720SGraeme Russ static __inline__ int variable_test_bit(int nr, volatile void * addr)
244fea25720SGraeme Russ {
245fea25720SGraeme Russ int oldbit;
246fea25720SGraeme Russ
247fea25720SGraeme Russ __asm__ __volatile__(
248fea25720SGraeme Russ "btl %2,%1\n\tsbbl %0,%0"
249fea25720SGraeme Russ :"=r" (oldbit)
250fea25720SGraeme Russ :"m" (ADDR),"Ir" (nr));
251fea25720SGraeme Russ return oldbit;
252fea25720SGraeme Russ }
253fea25720SGraeme Russ
254fea25720SGraeme Russ #define test_bit(nr,addr) \
255fea25720SGraeme Russ (__builtin_constant_p(nr) ? \
256fea25720SGraeme Russ constant_test_bit((nr),(addr)) : \
257fea25720SGraeme Russ variable_test_bit((nr),(addr)))
258fea25720SGraeme Russ
259fea25720SGraeme Russ /**
260fea25720SGraeme Russ * find_first_zero_bit - find the first zero bit in a memory region
261fea25720SGraeme Russ * @addr: The address to start the search at
262fea25720SGraeme Russ * @size: The maximum size to search
263fea25720SGraeme Russ *
264fea25720SGraeme Russ * Returns the bit-number of the first zero bit, not the number of the byte
265fea25720SGraeme Russ * containing a bit.
266fea25720SGraeme Russ */
find_first_zero_bit(void * addr,unsigned size)267fea25720SGraeme Russ static __inline__ int find_first_zero_bit(void * addr, unsigned size)
268fea25720SGraeme Russ {
269fea25720SGraeme Russ int d0, d1, d2;
270fea25720SGraeme Russ int res;
271fea25720SGraeme Russ
272fea25720SGraeme Russ if (!size)
273fea25720SGraeme Russ return 0;
274fea25720SGraeme Russ /* This looks at memory. Mark it volatile to tell gcc not to move it around */
275fea25720SGraeme Russ __asm__ __volatile__(
276fea25720SGraeme Russ "movl $-1,%%eax\n\t"
277fea25720SGraeme Russ "xorl %%edx,%%edx\n\t"
278fea25720SGraeme Russ "repe; scasl\n\t"
279fea25720SGraeme Russ "je 1f\n\t"
280fea25720SGraeme Russ "xorl -4(%%edi),%%eax\n\t"
281fea25720SGraeme Russ "subl $4,%%edi\n\t"
282fea25720SGraeme Russ "bsfl %%eax,%%edx\n"
283fea25720SGraeme Russ "1:\tsubl %%ebx,%%edi\n\t"
284fea25720SGraeme Russ "shll $3,%%edi\n\t"
285fea25720SGraeme Russ "addl %%edi,%%edx"
286fea25720SGraeme Russ :"=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2)
287fea25720SGraeme Russ :"1" ((size + 31) >> 5), "2" (addr), "b" (addr));
288fea25720SGraeme Russ return res;
289fea25720SGraeme Russ }
290fea25720SGraeme Russ
291fea25720SGraeme Russ /**
292fea25720SGraeme Russ * find_next_zero_bit - find the first zero bit in a memory region
293fea25720SGraeme Russ * @addr: The address to base the search on
294fea25720SGraeme Russ * @offset: The bitnumber to start searching at
295fea25720SGraeme Russ * @size: The maximum size to search
296fea25720SGraeme Russ */
find_next_zero_bit(void * addr,int size,int offset)297fea25720SGraeme Russ static __inline__ int find_next_zero_bit (void * addr, int size, int offset)
298fea25720SGraeme Russ {
299fea25720SGraeme Russ unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
300fea25720SGraeme Russ int set = 0, bit = offset & 31, res;
301fea25720SGraeme Russ
302fea25720SGraeme Russ if (bit) {
303fea25720SGraeme Russ /*
304fea25720SGraeme Russ * Look for zero in first byte
305fea25720SGraeme Russ */
306fea25720SGraeme Russ __asm__("bsfl %1,%0\n\t"
307fea25720SGraeme Russ "jne 1f\n\t"
308fea25720SGraeme Russ "movl $32, %0\n"
309fea25720SGraeme Russ "1:"
310fea25720SGraeme Russ : "=r" (set)
311fea25720SGraeme Russ : "r" (~(*p >> bit)));
312fea25720SGraeme Russ if (set < (32 - bit))
313fea25720SGraeme Russ return set + offset;
314fea25720SGraeme Russ set = 32 - bit;
315fea25720SGraeme Russ p++;
316fea25720SGraeme Russ }
317fea25720SGraeme Russ /*
318fea25720SGraeme Russ * No zero yet, search remaining full bytes for a zero
319fea25720SGraeme Russ */
320fea25720SGraeme Russ res = find_first_zero_bit (p, size - 32 * (p - (unsigned long *) addr));
321fea25720SGraeme Russ return (offset + set + res);
322fea25720SGraeme Russ }
323fea25720SGraeme Russ
324fea25720SGraeme Russ /**
325fea25720SGraeme Russ * ffz - find first zero in word.
326fea25720SGraeme Russ * @word: The word to search
327fea25720SGraeme Russ *
328fea25720SGraeme Russ * Undefined if no zero exists, so code should check against ~0UL first.
329fea25720SGraeme Russ */
ffz(unsigned long word)330fea25720SGraeme Russ static __inline__ unsigned long ffz(unsigned long word)
331fea25720SGraeme Russ {
332fea25720SGraeme Russ __asm__("bsfl %1,%0"
333fea25720SGraeme Russ :"=r" (word)
334fea25720SGraeme Russ :"r" (~word));
335fea25720SGraeme Russ return word;
336fea25720SGraeme Russ }
337fea25720SGraeme Russ
338fea25720SGraeme Russ #ifdef __KERNEL__
339fea25720SGraeme Russ
340fea25720SGraeme Russ /**
3416c2f758cSFabio Estevam * __ffs - find first set bit in word
3426c2f758cSFabio Estevam * @word: The word to search
3436c2f758cSFabio Estevam *
3446c2f758cSFabio Estevam * Undefined if no bit exists, so code should check against 0 first.
3456c2f758cSFabio Estevam */
__ffs(unsigned long word)3466c2f758cSFabio Estevam static inline unsigned long __ffs(unsigned long word)
3476c2f758cSFabio Estevam {
3486c2f758cSFabio Estevam __asm__("rep; bsf %1,%0"
3496c2f758cSFabio Estevam : "=r" (word)
3506c2f758cSFabio Estevam : "rm" (word));
3516c2f758cSFabio Estevam return word;
3526c2f758cSFabio Estevam }
3536c2f758cSFabio Estevam
3546c2f758cSFabio Estevam /**
355fea25720SGraeme Russ * ffs - find first bit set
356fea25720SGraeme Russ * @x: the word to search
357fea25720SGraeme Russ *
358fea25720SGraeme Russ * This is defined the same way as
359fea25720SGraeme Russ * the libc and compiler builtin ffs routines, therefore
360fea25720SGraeme Russ * differs in spirit from the above ffz (man ffs).
361fea25720SGraeme Russ */
ffs(int x)362fea25720SGraeme Russ static __inline__ int ffs(int x)
363fea25720SGraeme Russ {
364fea25720SGraeme Russ int r;
365fea25720SGraeme Russ
366fea25720SGraeme Russ __asm__("bsfl %1,%0\n\t"
367fea25720SGraeme Russ "jnz 1f\n\t"
368fea25720SGraeme Russ "movl $-1,%0\n"
3696c2f758cSFabio Estevam "1:" : "=r" (r) : "rm" (x));
3706c2f758cSFabio Estevam
371fea25720SGraeme Russ return r+1;
372fea25720SGraeme Russ }
373fea25720SGraeme Russ #define PLATFORM_FFS
374fea25720SGraeme Russ
__ilog2(unsigned int x)3758abebe3eSGraeme Russ static inline int __ilog2(unsigned int x)
3768abebe3eSGraeme Russ {
3778abebe3eSGraeme Russ return generic_fls(x) - 1;
3788abebe3eSGraeme Russ }
3798abebe3eSGraeme Russ
380fea25720SGraeme Russ /**
381fea25720SGraeme Russ * hweightN - returns the hamming weight of a N-bit word
382fea25720SGraeme Russ * @x: the word to weigh
383fea25720SGraeme Russ *
384fea25720SGraeme Russ * The Hamming Weight of a number is the total number of bits set in it.
385fea25720SGraeme Russ */
386fea25720SGraeme Russ
387fea25720SGraeme Russ #define hweight32(x) generic_hweight32(x)
388fea25720SGraeme Russ #define hweight16(x) generic_hweight16(x)
389fea25720SGraeme Russ #define hweight8(x) generic_hweight8(x)
390fea25720SGraeme Russ
391fea25720SGraeme Russ #endif /* __KERNEL__ */
392fea25720SGraeme Russ
393fea25720SGraeme Russ #ifdef __KERNEL__
394fea25720SGraeme Russ
395fea25720SGraeme Russ #define ext2_set_bit __test_and_set_bit
396fea25720SGraeme Russ #define ext2_clear_bit __test_and_clear_bit
397fea25720SGraeme Russ #define ext2_test_bit test_bit
398fea25720SGraeme Russ #define ext2_find_first_zero_bit find_first_zero_bit
399fea25720SGraeme Russ #define ext2_find_next_zero_bit find_next_zero_bit
400fea25720SGraeme Russ
401fea25720SGraeme Russ /* Bitmap functions for the minix filesystem. */
402fea25720SGraeme Russ #define minix_test_and_set_bit(nr,addr) __test_and_set_bit(nr,addr)
403fea25720SGraeme Russ #define minix_set_bit(nr,addr) __set_bit(nr,addr)
404fea25720SGraeme Russ #define minix_test_and_clear_bit(nr,addr) __test_and_clear_bit(nr,addr)
405fea25720SGraeme Russ #define minix_test_bit(nr,addr) test_bit(nr,addr)
406fea25720SGraeme Russ #define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
407fea25720SGraeme Russ
408fea25720SGraeme Russ #endif /* __KERNEL__ */
409fea25720SGraeme Russ
410fea25720SGraeme Russ #endif /* _I386_BITOPS_H */
411