hi all How to understand some codes in the function of __FD_SET?

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

 



hi all:
       the codes of functions is:

 51 #undef  __FD_SET
 52 static __inline__ void __FD_SET(unsigned long __fd, __kernel_fd_set *__fdsetp)
 53 {
 54         unsigned long __tmp = __fd / __NFDBITS;
 55         unsigned long __rem = __fd % __NFDBITS;
 56         __fdsetp->fds_bits[__tmp] |= (1UL<<__rem);
 57 }

I can't understand the usage of __rem,How to understand it? thank you.

PS:


 21 #undef __NFDBITS
 22 #define __NFDBITS       (8 * sizeof(unsigned long))
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[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