fix REQ-51

This commit is contained in:
Tomoki Shirasawa
2016-03-26 12:23:16 +09:00
parent a11479eba8
commit b0096a2740
10 changed files with 249 additions and 109 deletions

View File

@@ -0,0 +1,14 @@
/* bitops-clear_bit.h COPYRIGHT FUJITSU LIMITED 2014 */
#ifndef INCLUDE_BITOPS_CLEAR_BIT_H
#define INCLUDE_BITOPS_CLEAR_BIT_H
static inline void clear_bit(int nr, volatile unsigned long *addr)
{
unsigned long mask = (1UL << (nr % BITS_PER_LONG));
unsigned long *p = ((unsigned long *)addr) + (nr / BITS_PER_LONG);
*p &= ~mask;
}
#endif