what's the difference __set_64bit_constant from __set_64bit_var ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
There are two inline function called __set_64bit_constant and __set_64bit_var.


static inline void __set_64bit_constant (unsigned long long *ptr,
unsigned long long value)
{
__set_64bit(ptr,(unsigned int)(value), (unsigned int)((value)>>32ULL));
}
#define ll_low(x) *(((unsigned int*)&(x))+0)
#define ll_high(x) *(((unsigned int*)&(x))+1)


static inline void __set_64bit_var (unsigned long long *ptr,
                        unsigned long long value)
{
       __set_64bit(ptr,ll_low(value), ll_high(value));
}

why __set_64bit_constant shift right the unsigned long long value but __set_64bit_var call ll_high/ll_low
to gain the high or low valude?
I think __set_64bit_constant can call ll_low/ll_high and __set_64_var can use shift right.




--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux