source: cmedia/trunk/Include/Asm/bitops.h

Last change on this file was 354, checked in by stevenhl, 17 years ago

Import untested baseline cmedia sources, work products and binaries
Binaries and work products should be deleted from repository.
once new builds are verified to work.

File size: 1.1 KB
RevLine 
[354]1/* $Id: bitops.h,v 1.1 2000/04/23 14:55:27 ktk Exp $ */
2
3#ifndef _I386_BITOPS_H
4#define _I386_BITOPS_H
5
6/*
7 * Copyright 1992, Linus Torvalds.
8 */
9
10/*
11 * These have to be done with inline assembly: that way the bit-setting
12 * is guaranteed to be atomic. All bit operations return 0 if the bit
13 * was cleared before the operation and != 0 if it was not.
14 *
15 * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
16 */
17
18/*
19 * Function prototypes to keep gcc -Wall happy
20 */
21extern void set_bit(int nr, volatile void * addr);
22extern void clear_bit(int nr, volatile void * addr);
23extern void change_bit(int nr, volatile void * addr);
24extern int test_and_set_bit(int nr, volatile void * addr);
25extern int test_and_clear_bit(int nr, volatile void * addr);
26extern int test_and_change_bit(int nr, volatile void * addr);
27extern int __constant_test_bit(int nr, const volatile void * addr);
28extern int __test_bit(int nr, volatile void * addr);
29extern int find_first_zero_bit(void * addr, unsigned size);
30extern int find_next_zero_bit (void * addr, int size, int offset);
31extern unsigned long ffz(unsigned long word);
32
33#endif /* _I386_BITOPS_H */
Note: See TracBrowser for help on using the repository browser.