'\" t .\" Title: set_bit .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Basic C Library Functions .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "SET_BIT" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Basic C Library Functions" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" set_bit \- Atomically set a bit in memory .SH "SYNOPSIS" .HP \w'void\ set_bit('u .BI "void set_bit(long\ " "nr" ", volatile\ unsigned\ long\ *\ " "addr" ");" .SH "ARGUMENTS" .PP \fInr\fR .RS 4 the bit to set .RE .PP \fIaddr\fR .RS 4 the address to start counting from .RE .SH "DESCRIPTION" .PP This function is atomic and may not be reordered\&. See \fB__set_bit\fR if you do not require the atomic guarantees\&. .SH "NOTE" .PP there are no guarantees that this function will not be reordered on non x86 architectures, so if you are writing portable code, make sure not to rely on its reordering guarantees\&. .PP Note that \fInr\fR may be almost arbitrarily large; this function is not restricted to acting on a single\-word quantity\&. .SH "COPYRIGHT" .br