This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Srinivasa Ds wrote: [...]
+// Return the number of open file handlers for the given task +function task_open_file_handler:long (task:long) %{ + struct task_struct *t = (struct task_struct *)(long)THIS->task; + struct fdtable *fdt = kread(&(t->files->fdt));
+ unsigned int count=0, fd; + rcu_read_lock(); + for (fd = 0; fd < kread(&(fdt->max_fds)); fd++) {
+// Return the maximum number of file handlers for the given task +function task_max_file_handler:long (task:long) %{ + struct task_struct *t = (struct task_struct *)(long)THIS->task; + struct files_struct *f = kread (&(t->files)); + rcu_read_lock(); + THIS->__retvalue = kread(&(f->fdt->max_fds));
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |