/* Create the final mask for both bytemask and size */ staticinlineunsignedlong create_zero_mask(unsignedlong bits)
{
bits = (bits - 1) & ~bits; return bits >> 7;
}
/* The mask we created is directly usable as a bytemask */ #define zero_bytemask(mask) (mask)
/* Carl Chatfield / Jan Achrenius G+ version for 32-bit */ staticinlineunsignedlong find_zero(unsignedlong mask)
{ /* (000000 0000ff 00ffff ffffff) -> ( 1 1 2 3 ) */ long a = (0x0ff0001+mask) >> 23; /* Fix the 1 for 00 case */ return a & mask;
}
#endif
/* * Load an unaligned word from kernel space. * * In the (very unlikely) case of the word being a page-crosser * and the next page not being mapped, take the exception and * return zeroes in the non-existing part.
*/ staticinlineunsignedlong load_unaligned_zeropad(constvoid *addr)
{ unsignedlong ret;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.