Re: Directory Notifications & FD arrays

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

 



On 10/19/05, prasad Musale <prasad.musale@xxxxxxxxx> wrote:
> Hello Friends,
>                    I have few questions:
> 1. Why we need directory notifications?

For this u can google !!!! and u can also consult this link which i
found on google ...
http://www.canb.auug.org.au/~sfr/idle.html


> 2. When get_unused_fd() is called in sys_open() what is the purpose behind
> expanding fdset & fd array?

I can't say much about it, but what i understand by just looking at
the code of sys_open is get_unused_fd is used to get file descriptors
from the un-used file destriptors for the current process by finding
the next_zero_bit from current->files->open_fds->fds_bits, and later
it checks for the limit of total number of files that can be opened by
the current process ... and if its not reached yet then it expands the
fd_set and fd_array of the current process such that it will be able
to the the un-used fd for the process .... (CMIIW)

> 3. What is fastcall (encountered in void fastcall fd_install())?
>

The fastcall is defined in include/asm-i386/linkage.h as
      #define fastcall        __attribute__((regparm(3)))
and __attribute__ is used to give attributes to the compiler (gcc) in
which regparm attribute is define in gcc functions attributes list as

regparm (number)
    On the Intel 386, the regparm attribute causes the compiler to
pass up to number integer arguments in registers EAX, EDX, and ECX
instead of on the stack. Functions that take a variable number of
arguments will continue to be passed all of their arguments on the
stack.


--
Fawad Lateef

P.S.  ..... I want to mention that the kernelnewbies list is for
newbies (me too is a newbie) and newbies can ask any question which
might be so childish to explain for senior people, but what I saw is
many senior people just comments on the pattern the question is asked
but not explain them !!! Is this correct ??

--
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