Function Pointer Question
Valdis.Kletnieks at vt.edu
Valdis.Kletnieks at vt.edu
Thu Apr 2 09:13:38 EDT 2015
On Thu, 02 Apr 2015 06:54:42 -0400, Nicholas Krause said:
> I looked in to it and the kernel seems to be one of the few places where this
> is done along with in line functions. Why do we need function pointers in the
> kernel, outside of device drivers is my real question and is there any way to
> do the code using them without function pointers at all, I am assuming no.
Geez Nick, you didn't look very hard at all, did you?
[/usr/src/linux-next] find include -type f | xargs egrep '^struct .*_op.*{$' | sort
There's 391 of them (at least in yesterday's linux-next tree).
You should *at least* know and understand 'struct file_operations',
'struct dentry_operations', 'struct inode_operations', and 'struct super_operations"
if you plan to have any realistic hope of understanding the VFS - which should
be important to you, as I seem to recall you were interested in btrfs2.
See include/linux/fs.h for the details.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150402/2d5accad/attachment.bin
More information about the Kernelnewbies
mailing list