Asynchronous Notification in Driver

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

 



 

This is about Asynchronous Notification capability in drivers.

 

Can someone tell me the use of ‘magic’ element in ‘fasync_struct’ ?

Link: http://lxr.linux.no/source/include/linux/fs.h?v=2.4.21#L639

 

Also one suggestion about ‘fasync_helper()’ function. In this function, it would better if we can place the first ‘if’ condition after the ‘for’ loop, it will increase the performance. In ‘for’ loop we are searching the ‘fasync_struct’ list, if we are able to find the element in that list we need not to allocate a new ‘fasync_struct’, which will avoid the extra overhead of first allocating and then de-allocating the new structure. We should allocate new structure only if we are not able to find the element in the already maintained list of ‘fasync_struct’ structures.

Link: http://lxr.linux.no/source/fs/fcntl.c?v=2.4.21#L465

 

Regards,

Gaurav

 


[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