Question about "fd" token

From: ÀîºêÁÁ (lihongliang070_at_tom.com)
Date: Sun May 17 2009 - 03:40:23 PDT

  • Next message: Edith: "No time for delays"
    Hello, Professor:
    
    Thank you very much for the previous answer.
    
    I have a question about issuing checkpoint request. when I am reading "/util/cr_checkpoint.c"  The code:
    
    /* issue the request */
        err = cr_request_checkpoint(&cr_args, &cr_handle);
    
    This is how BLCR issue a checkpoint request, I find the function"cr_request_checkpoint" final calls "cri_syscall_token(*handle, CR_OP_CHKPT_REQ, (uintptr_t)&req)" and the first argument is actually a file descriptor which opened in "/proc/checkpoint/ctrl".
    
    But at the same time , there is another function"cri_syscall()", The difference between this one and"cri_syscall_token()" is this one have not to accept a "fd" as an argument. however, it calls
    "__cri_ioctl((int)cri_atomic_read(&local_fd), op, (void *)arg, errno_p);"
    
    My question is about the local variable "local_fd", I see it in the "/libcr/syscall.c". I find some other function in this file use it to control the "thread access". But I still do not know it's other usage here.
    
    Q2:  
    Many function like"abort _checkpoint","cr_checkpoint","cr_forword_checkpoint" finally calls "cri_syscall()"  Which "fd" are they exactly using? the same as the fd opened in "/proc/checkpoint/ctrl"??
    
    Q3:
    Why can not we use only "cri_syscall_token" ???  
    
    

  • Next message: Edith: "No time for delays"