/haiku/src/libs/compat/freebsd_network/compat/machine/generic/ |
H A D | cpufunc.h | 13 int bit; local 16 for (bit = 1; mask != 1; bit++) 18 return bit; 26 int bit; local 30 for (bit = 1; !(mask & 1); bit++) 32 return (bit);
|
/haiku/src/add-ons/kernel/file_systems/ntfs/libntfs/ |
H A D | support.h | 64 * Simple bit operation macros. NOTE: These are NOT atomic. 66 #define test_bit(bit, var) ((var) & (1 << (bit))) 67 #define set_bit(bit, var) (var) |= 1 << (bit) 68 #define clear_bit(bit, var) (var) &= ~(1 << (bit)) 70 #define test_and_set_bit(bit, var) \ 72 const BOOL old_state = test_bit(bit, var); \ 73 set_bit(bit, va [all...] |
H A D | bitmap.h | 32 * - Operations are 8-bit only to ensure the functions work both on little 33 * and big endian machines! So don't make them 32-bit ops! 34 * - bitmap starts at bit = 0 and ends at bit = bitmap size - 1. 35 * - _Caller_ has to make sure that the bit to operate on is less than the 39 extern void ntfs_bit_set(u8 *bitmap, const u64 bit, const u8 new_value); 40 extern char ntfs_bit_get(const u8 *bitmap, const u64 bit); 41 extern char ntfs_bit_get_and_set(u8 *bitmap, const u64 bit, const u8 new_value); 46 * ntfs_bitmap_set_bit - set a bit in a bitmap 48 * @bit 54 ntfs_bitmap_set_bit(ntfs_attr *na, s64 bit) argument 68 ntfs_bitmap_clear_bit(ntfs_attr *na, s64 bit) argument [all...] |
H A D | bitmap.c | 49 * ntfs_bit_set - set a bit in a field of bits 51 * @bit: bit to set 52 * @new_value: value to set bit to (0 or 1) 54 * Set the bit @bit in the @bitmap to @new_value. Ignore all errors. 56 void ntfs_bit_set(u8 *bitmap, const u64 bit, const u8 new_value) argument 61 bitmap[bit >> 3] &= ~(1 << (bit & 7)); 63 bitmap[bit >> 74 ntfs_bit_get(const u8 *bitmap, const u64 bit) argument 90 ntfs_bit_get_and_set(u8 *bitmap, const u64 bit, const u8 new_value) argument 120 int bit, firstbyte, lastbyte, lastbyte_pos, tmp, ret = -1; local [all...] |
H A D | mft.c | 506 * ntfs_ffz - Find the first unset (zero) bit in a word 550 s64 pass_end, ll, data_pos, pass_start, ofs, bit; local 616 /* If we read at least one byte, search @buf for a zero bit. */ 619 bit = data_pos & 7; 622 "data_pos 0x%llx, bit 0x%llx, " 624 (long long)data_pos, (long long)bit, 626 for (; bit < size && data_pos + bit < pass_end; 627 bit &= ~7ull, bit 1428 s64 ll, bit; local 1713 s64 ll, bit; local [all...] |
/haiku/src/system/libroot/os/arch/sparc/ |
H A D | fpu_sqrt.c | 123 * zero bit at the top of x. Doing so means that q is not going to acquire 124 * a 1 bit in the first trip around the loop (since x0 < 2^NBITS). If the 159 * bit at a time, from the top down, and is not used itself in the loop 161 * in an integer, one word at a time, which saves a bit of work. Also, 162 * since 1 << k is always a `new' bit in q, 1 << k and 1 << (k+1) are 174 * Furthermore, we can prove with a bit of work that x never exceeds y by 181 * In fact, we want even one more bit (for a carry, to avoid compares), or 190 u_int bit, q, tt; local 251 * set the top bit in q, so we can do that manually and start 252 * the loop at the next bit dow [all...] |
H A D | fpu_mul.c | 58 * Each step consists of shifting the accumulator right one bit 59 * (maintaining any guard bits) and, if the next bit in y is set, 61 * we advance one bit leftward in y. Algorithmically: 64 * for (bit = 0; bit < FP_NMANT; bit++) { 66 * if (Y & (1 << bit)) 73 * shifted right, but at most one bit. 89 * - bit FP_NMANT-1 is set, and FP_1*2 fits in a word. 93 * run 32 times without adding X to A. We can do a 32-bit shif 103 u_int a3, a2, a1, a0, x3, x2, x1, x0, bit, m; local [all...] |
H A D | fpu_div.c | 66 * if X < Y. In that case, it will have to be shifted left one bit to 73 * The quotient mantissa X/Y can then be computed one bit at a time 80 * for (bit = FP_NMANT; --bit >= 0; R *= 2) { 82 * Q |= 1 << bit; 87 * The subtraction R -= Y always removes the uppermost bit from R (and 92 * included in the expanded internal representation. The sticky bit 98 * one bit at a time ``from the top down''. This means that we can 104 * is therefore at in [2.0,4.0).) Thus Q is sure to have bit FP_NMANT-1 111 * bit 156 u_int q, bit; local [all...] |
/haiku/src/system/libroot/os/arch/ppc/ |
H A D | atomic.S | 14 #warning IMPLEMENT GCC 64-bit ATOMICS ON POWERPC 32-bit! 16 /* These are to fill in 64-bit atomic calls emitted by 17 * by GCC when 64-bit atomics are unavailable. 18 * (aka, on 32-bit PowerPC
|
/haiku/src/add-ons/kernel/file_systems/ext2/ |
H A D | BitmapBlock.cpp | 147 TRACE("BitmapBlock::_Update(): start index: %" B_PRIu32 ", start bit: %" 259 uint32 bit = pos & 0x1F; local 262 uint32 mask = ~((1 << bit) - 1); 265 TRACE("BitmapBlock::_FindNext(): index: %" B_PRIu32 ", bit: %" B_PRIu32 266 ", mask: %" B_PRIx32 ", bits: %" B_PRIx32 "\n", index, bit, mask, 271 // Find a 32 bits block that has a marked bit 275 bit = 0; 301 for (; bit < maxBit; ++bit) { 302 // Find the marked bit 329 int32 bit = pos & 0x1F; local [all...] |
/haiku/src/libs/compat/freebsd_network/ |
H A D | fbsd_ether.c | 51 int bit; 57 for (data = *buf++, bit = 0; bit < 8; bit++, data >>= 1) 96 int bit; local 102 for (data = *buf++, bit = 0; bit < 8; bit++, data >>= 1) {
|
H A D | pci.cpp | 182 pci_set_command_bit(device_t dev, uint16_t bit) argument 185 pci_write_config(dev, PCI_command, command | bit, 2); 192 // We do this a bit later than FreeBSD does. 205 int bit = 0; local 209 bit = PCI_command_io; 212 bit = PCI_command_memory; 218 pci_set_command_bit(dev, bit); 219 if (pci_read_config(dev, PCI_command, 2) & bit)
|
/haiku/headers/libs/agg/ |
H A D | agg_bitset_iterator.h | 42 unsigned bit() const function in class:agg::bitset_iterator
|
H A D | agg_math.h | 266 //significant bit of the value. For other processors 289 //arcitectures including 64bit ones. 291 int bit=0; 299 bit = t >> 24; 300 if(bit) 302 bit = g_elder_bit_table[bit] + 24; 306 bit = (t >> 16) & 0xFF; 307 if(bit) 309 bit [all...] |
/haiku/src/system/libroot/posix/glibc/wctype/ |
H A D | wctype.h | 72 endian). We define the bit value interpretations here dependent on the 77 # define _ISwbit(bit) (1 << (bit)) 79 # define _ISwbit(bit) \ 80 ((bit) < 8 ? (int) ((1UL << (bit)) << 24) \ 81 : ((bit) < 16 ? (int) ((1UL << (bit)) << 8) \ 82 : ((bit) < 24 ? (int) ((1UL << (bit)) >> [all...] |
/haiku/src/add-ons/kernel/drivers/audio/echo/generic/ |
H A D | CChannelMask.cpp | 94 // Retrieve an output bit mask and an input bitmask. 133 // Call SetIndexInMask and ClearIndexInMask to set or clear a single bit. 158 // The search starts at the bit specified by wStartPipeIndex and returns 159 // the pipe index for the first non-zero bit found. 167 CH_MASK bit; local 170 bit = 1 << wStartPipeIndex; 172 while (bit != 0) 174 if (0 != (m_Mask & bit)) 177 bit <<= 1; 188 // Returns TRUE if the bit specifie 467 CH_MASK_DSP bit,temp; local 480 CH_MASK_DSP bit,temp; local 498 CH_MASK_DSP temp,bit; local [all...] |
/haiku/src/add-ons/kernel/drivers/disk/nvme/libnvme/ |
H A D | nvme_common.h | 363 * Test a bit value. 365 static inline int test_bit(__u8 *bitmap, unsigned int bit) argument 367 return bitmap[bit >> 3] & (1U << (bit & 0x7)); 371 * Set a bit. 373 static inline void set_bit(__u8 *bitmap, unsigned int bit) argument 375 bitmap[bit >> 3] |= 1U << (bit & 0x7); 379 * Clear a bit. 381 static inline void clear_bit(__u8 *bitmap, unsigned int bit) argument 393 unsigned int i, j, bit, count = (nr_bits + 63) >> 6; local [all...] |
/haiku/src/system/libroot/posix/glibc/ctype/ |
H A D | ctype.h | 37 endian). We define the bit value interpretations here dependent on the 42 # define _ISbit(bit) (1 << (bit)) 44 # define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8)) 87 #define __isascii(c) (((c) & ~0x7f) == 0) /* If C is a 7 bit value. */
|
/haiku/src/libs/x86emu/ |
H A D | ops2.c | 365 int bit, disp; local 380 bit = *shiftreg & 0x1F; 383 CONDITIONAL_SET_FLAG(srcval & (0x1 << bit), F_CF); 393 bit = *shiftreg & 0xF; 396 CONDITIONAL_SET_FLAG(srcval & (0x1 << bit), F_CF); 408 bit = *shiftreg & 0x1F; 411 CONDITIONAL_SET_FLAG(srcval & (0x1 << bit), F_CF); 421 bit = *shiftreg & 0xF; 424 CONDITIONAL_SET_FLAG(srcval & (0x1 << bit), F_CF); 436 bit 788 int bit, disp; local 1439 int bit, disp; local 1861 int bit; local 2116 int bit, disp; local [all...] |
/haiku/src/add-ons/accelerants/common/ |
H A D | i2c.c | 170 //! Send one bit 172 send_bit(const i2c_bus *bus, uint8 bit, int timeout) argument 176 //TRACE("send_bit(bit = %d)\n", bit & 1); 178 bus->set_signals(bus->cookie, 0, bit & 1); 180 bus->set_signals(bus->cookie, 1, bit & 1); 184 TRACE("%s: Timeout when sending next bit\n", __func__); 189 bus->set_signals(bus->cookie, 0, bit & 1); 269 //! Send slave address, obeying 10-bit addresses and general call addresses 288 // - 1111 0xxx - 10 bit addres 301 receive_bit(const i2c_bus *bus, bool *bit, int timeout) argument 348 bool bit; local [all...] |
/haiku/headers/private/interface/ |
H A D | ViewPrivate.h | 97 inline bool IsValid(uint32 bit) const; 169 ViewState::IsValid(uint32 bit) const 171 return valid_flags & bit;
|
/haiku/src/system/kernel/slab/ |
H A D | HashedObjectCache.cpp | 24 int bit; local 25 for (bit = 0; value != 1; bit++) 27 return bit;
|
/haiku/src/system/kernel/arch/arm/ |
H A D | soc_omap3.cpp | 32 uint32 bit = irq % 32, bank = irq / 32; local 33 fRegBase[INTCPS_MIR_CLEARn + (8 * bank)] = 1 << bit; 40 uint32 bit = irq % 32, bank = irq / 32; local 41 fRegBase[INTCPS_MIR_SETn + (8 * bank)] = 1 << bit;
|
/haiku/src/add-ons/kernel/network/protocols/ipv6/ |
H A D | ipv6_address.cpp | 236 /*! Routing utility function: determines the least significant bit that is set 238 \return the number of the first bit that is set (0-32, where 32 means 239 that there's no bit set in the mask). 252 for (uint8 bit = 0; bit < 8; bit++) { 253 if ((pmask[i] & (1 << (7 - bit))) == 0) 254 return i * 8 + bit; 282 for (int8 bit = 7; bit > [all...] |
/haiku/src/system/kernel/platform/atari_m68k/ |
H A D | platform.cpp | 211 uint8 bit = 1 << (irq % 8); local 215 if (val & bit == 0) { 216 val |= bit; 225 uint8 bit = 1 << (irq % 8); local 229 if (val & bit) { 230 val &= ~bit; 239 uint8 bit = 1 << (irq % 8); local 243 if (val & bit) { 244 val &= ~bit;
|