1atomic_bits(9F)          Kernel Functions for Drivers          atomic_bits(9F)
2
3
4

NAME

6       atomic_bits,  atomic_set_long_excl, atomic_clear_long_excl - atomic set
7       and clear bit operations
8

SYNOPSIS

10       #include <sys/atomic.h>
11
12       int atomic_set_long_excl(volatile ulong_t *target, uint_t bit);
13
14
15       int atomic_clear_long_excl(volatile ulong_t *target, uint_t bit);
16
17

DESCRIPTION

19       The atomic_set_long_excl() and atomic_clear_long_excl() functions  per‐
20       form  an  exclusive  atomic  bit  set or clear operation on target. The
21       value of bit specifies the number of the bit to be modified within tar‐
22       get. Bits are numbered from zero to one less than the maximum number of
23       bits in a long. If the value of bit falls outside of  this  range,  the
24       result of the operation is undefined.
25

RETURN VALUES

27       The   atomic_set_long_excl()   and  atomic_clear_long_excl()  functions
28       return 0 if bit was successfully set or cleared. They return -1 if  bit
29       was already set or cleared.
30

ERRORS

32       No errors are defined.
33

CONTEXT

35       These functions can be called from user, interrupt, or kernel context.
36

ATTRIBUTES

38       See attributes(5) for descriptions of the following attributes:
39
40
41
42
43       ┌─────────────────────────────┬─────────────────────────────┐
44       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
45       ├─────────────────────────────┼─────────────────────────────┤
46       │Interface Stability          │Committed                    │
47       └─────────────────────────────┴─────────────────────────────┘
48

SEE ALSO

50       atomic_add(9F),    atomic_and(9F),    atomic_cas(9F),   atomic_dec(9F),
51       atomic_inc(9F),   atomic_or(9F),    atomic_swap(9F),    membar_ops(9F),
52       attributes(5), atomic_ops(3C)
53
54
55
56SunOS 5.11                        16 Jan 2006                  atomic_bits(9F)
Impressum