ror16(9)
π« ror16(9) π«
okay so welcome to the kernel API manual bestie, we're doing ror16 today and honestly? she's iconic. tiny function, huge main character energy. this is the page for rotating a 16-bit value right π
β¨ NAME β¨
ror16 β rotate a 16-bit value right. that's it. that's the whole gig. no cap π
π¦ SYNOPSIS π¦
__u16 ror16 (__u16 word , unsigned int shift );
look at her. so simple. so clean. she takes two things and gives you back a __u16, periodt β¨
πΈ ARGUMENTS πΈ
wordβ the value to rotate. this is your lil guy going in for the spin πshiftβ the bits to roll. how far right are we yeeting it, iykyk π₯
π SEE ALSO π
okay so if you liked this one (and you did, obviously), the kernel file ./include/linux/bitops.h has the whole friend group π«Ά. lowkey it's giving bit-twiddling royalty:
rol64(9)ror64(9)rol32(9)ror32(9)rol16(9)rol8(9)ror8(9)sign_extend32(9)sign_extend64(9)get_count_order_long(9)parity8(9)__ffs64(9)fns(9)assign_bit(9)__ptr_set_bit(9)__ptr_clear_bit(9)__ptr_test_bit(9)
literally the entire bitops squad, go read them all, they ate πβ¨
ngl bestie,shiftisunsigned intandwordis__u16β keep those types exactly how they are, the kernel does not play about types π
and that's the page!! mwah π this one lives over in ./include/linux and it's dated October 2026 β so yeah, mark your calendar, she's from the future, iconic behavior honestly ππβ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms