From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Mon May 18 2009 - 10:05:58 PDT
The structures you mention are defined in include/blcr_common.h.in (which is used to generate the file blcr_common.h). You say you don't ask a question until you cannot find the answer another way. However, this question and some of others you have asked could have been answered with the right tools. I don't wish to discourage you from answering questions when you need help, but if I can teach you how to find answers for yourself, that is more valuable than an answer alone. Are you familiar with the "grep" command? Grep could have found all instances of the string "struct cr_chkpt_args" as follows: $ grep -R 'struct cr_chkpt_args' . ./cr_module/cr_chkpt_req.c:int do_chkpt_req(struct file *filp, struct cr_chkpt_args *ureq) ./cr_module/cr_chkpt_req.c:int cr_chkpt_req(struct file *filp, struct cr_chkpt_args __user *arg) ./cr_module/cr_chkpt_req.c: struct cr_chkpt_args ureq; ./cr_module/cr_chkpt_req.c: struct cr_chkpt_args ureq; ./cr_module/cr_fops.c: return cr_chkpt_req(file, (struct cr_chkpt_args __user *)arg); ./cr_module/cr_module.h:extern int cr_chkpt_req(struct file *filp, struct cr_chkpt_args __user *arg); ./include/blcr_common.h.in:struct cr_chkpt_args { ./include/blcr_ioctl.h:// CR_OP_CHKPT_REQ(struct cr_chkpt_args *args) ./libcr/cr_request.c: struct cr_chkpt_args req; It should be clear that only the line in blcr_common.h.in looks like a definition of the structure. -Paul ����� wrote: > Hello, Professor: > > Thank you very much for your help, I have understand what you have > told me. > > I am not the person who asks questions as soon as they meet with a > problem, It's only when I can not work it out and can not find answer > through other ways will I resort to you . please excuse me.. > > > I know we can pass some arguments when we are calling ioctl > syscall.For example: > > #define CR_OP_HAND_CHKPT_INFO _IOR (CR_IOCTL_BASE, 0x0a, struct > cr_chkpt_info *) > #define CR_OP_CHKPT_REQ _IOW (CR_IOCTL_BASE, 0x10, struct cr_chkpt_args *) > #define CR_OP_CHKPT_FWD _IOW (CR_IOCTL_BASE, 0x13, struct cr_fwd_args *) > > when issue a ioctl syscall, struct"cr_chkpt_info" "cr_chkpt_args" > "cr_fwd_args" are passed. > "struct cr_chkpt_args req;" > "rc = cri_syscall_token(token, CR_OP_CHKPT_REQ, (uintptr_t)&req)" > > However, I can not find the definition of these structure... > > Are they allocated dynamically? I have never seen such a usage... > Is that because the arguments are from user space??? or some other > reasons??? > > > > > > > > > > =============================================== > ��������һ������TOM�������ɣ���������1.5G������ʲô�� > <http://bjcgi.163.net/cgi-bin/newreg.cgi?%0Arf=050602> > =============================================== > -- Paul H. Hargrove PHHargrove_at_lbl_dot_gov Future Technologies Group Tel: +1-510-495-2352 HPC Research Department Fax: +1-510-486-6900 Lawrence Berkeley National Laboratory