#ifndef _ASM_GENERIC_BITOPS_LOCK_H_
#define _ASM_GENERIC_BITOPS_LOCK_H_

/**
 * test_and_set_bit_lock - Set a bit and return its old value, for lock
 * @nr: Bit to set
 * @addr: Address to count from
 *
 * This operation is atomic and provides acquire barrier semantics.
 * It can be used to implement bit locks.
 */
#define test_and_set_bit_lock(nr, addr)	test_and_set_bit(nr, addr)

/**
 * clear_bit_unlock - Clear a bit in memory, for unlock
 * @nr: the bit to set
 * @addr: the address to start counting from
 *
 * This operation is atomic and provides release barrier semantics.
 */
#define clear_bit_unlock(nr, addr)	\
do {					\
	smp_mb__before_atomic();	\
	clear_bit(nr, addr);		\
} while (0)

/**
 * __clear_bit_unlock - Clear a bit in memory, for unlock
 * @nr: the bit to set
 * @addr: the address to start counting from
 *
 * A weaker form of clear_bit_unlock() as used by __bit_lock_unlock(). If all
 * the bits in the word are protected by this lock some archs can use weaker
 * ops to safely unlock.
 *
 * See for example x86's implementation.
 */
#define __clear_bit_unlock(nr, addr)	\
do {					\
	smp_mb__before_atomic();	\
	clear_bit(nr, addr);		\
} while (0)

#endif /* _ASM_GENERIC_BITOPS_LOCK_H_ */

'packet-rx-pump-back'>packet-rx-pump-back</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>net-next plumbings</td><td class='sub right'>Tobias Klauser</td></tr></table>
<table class='tabs'><tr><td>
<a href='/cgit.cgi/linux/net-next.git/'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?id=283725af0bd2a4a8600bbe5edeb9d7c72780d3a2'>refs</a><a class='active' href='/cgit.cgi/linux/net-next.git/log/include/media'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/include/media?id=283725af0bd2a4a8600bbe5edeb9d7c72780d3a2'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/include/media?id=283725af0bd2a4a8600bbe5edeb9d7c72780d3a2'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/include/media?id=283725af0bd2a4a8600bbe5edeb9d7c72780d3a2'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/include/media'>
<input type='hidden' name='id' value='283725af0bd2a4a8600bbe5edeb9d7c72780d3a2'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/log/?id=283725af0bd2a4a8600bbe5edeb9d7c72780d3a2'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/include?id=283725af0bd2a4a8600bbe5edeb9d7c72780d3a2'>include</a>/<a href='/cgit.cgi/linux/net-next.git/log/include/media?id=283725af0bd2a4a8600bbe5edeb9d7c72780d3a2'>media</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/include/media?id=283725af0bd2a4a8600bbe5edeb9d7c72780d3a2&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>