* targets of function pointer invocations
@ 2008-08-30 7:12 Firstname Lastname
2008-09-03 0:42 ` Randy Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Firstname Lastname @ 2008-08-30 7:12 UTC (permalink / raw)
To: linux-kernel
Hi all,
The lines 522-523 in function do_acct_process in file kernel/acct.c in version 2.6.26.3 are:
file->f_op->write(file, (char *)&ac,sizeof(acct_t), &file->f_pos);
What are the full set of targets of this function pointer invocation and how can one be sure, by examining the code, that this is in fact the complete set?
Thanks.
SKB
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: targets of function pointer invocations
2008-08-30 7:12 targets of function pointer invocations Firstname Lastname
@ 2008-09-03 0:42 ` Randy Dunlap
2008-09-03 0:53 ` Jeremy Fitzhardinge
0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2008-09-03 0:42 UTC (permalink / raw)
To: Firstname Lastname; +Cc: linux-kernel
On Sat, 30 Aug 2008 00:12:12 -0700 (PDT) Firstname Lastname wrote:
> Hi all,
>
> The lines 522-523 in function do_acct_process in file kernel/acct.c in version 2.6.26.3 are:
>
> file->f_op->write(file, (char *)&ac,sizeof(acct_t), &file->f_pos);
>
> What are the full set of targets of this function pointer invocation and how can one be sure, by examining the code, that this is in fact the complete set?
If I understand your question, you want to know what are the ->write()
function parameters and how does one determine them?
'file' is struct file, found in include/linux/fs.h.
'f_op' is struct file_operations, in the same file.
'write' is defined in struct file_operations as:
ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
4 typed parameters, returning ssize_t.
Is that what you meant?
---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: targets of function pointer invocations
2008-09-03 0:42 ` Randy Dunlap
@ 2008-09-03 0:53 ` Jeremy Fitzhardinge
0 siblings, 0 replies; 3+ messages in thread
From: Jeremy Fitzhardinge @ 2008-09-03 0:53 UTC (permalink / raw)
To: Randy Dunlap; +Cc: Firstname Lastname, linux-kernel
Randy Dunlap wrote:
> On Sat, 30 Aug 2008 00:12:12 -0700 (PDT) Firstname Lastname wrote:
>
>
>> Hi all,
>>
>> The lines 522-523 in function do_acct_process in file kernel/acct.c in version 2.6.26.3 are:
>>
>> file->f_op->write(file, (char *)&ac,sizeof(acct_t), &file->f_pos);
>>
>> What are the full set of targets of this function pointer invocation and how can one be sure, by examining the code, that this is in fact the complete set?
>>
>
> If I understand your question, you want to know what are the ->write()
> function parameters and how does one determine them?
>
> 'file' is struct file, found in include/linux/fs.h.
> 'f_op' is struct file_operations, in the same file.
> 'write' is defined in struct file_operations as:
>
> ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
>
> 4 typed parameters, returning ssize_t.
>
> Is that what you meant?
>
Actually, I think OP is asking what's the complete set of functions
->write can point to. You can look for all the in-tree assignments to
f_ops (or all the struct file_ops) to get the in-kernel estimate. But
any out of tree module could also install file_ops.write, so you can't
be exhaustive.
J
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-03 0:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-30 7:12 targets of function pointer invocations Firstname Lastname
2008-09-03 0:42 ` Randy Dunlap
2008-09-03 0:53 ` Jeremy Fitzhardinge
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.