Re: A question about BLCR source code

From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Wed May 06 2009 - 01:29:48 PDT

  • Next message: Claire Sonnabend: "Saw you on street!"
    These functions declared in libcr/cr_syscall.h are implemented in
    libcr/cr_syscall.c, near the end of the file. The implementations are
    done via macros that generate platform-specific inline assembly. For
    instance:
    
    cri_syscall3(int, __cri_open, __NR_open, const char*, int, int)
    
    The inline assembly macros, such as cri_syscall3, are in
    libcr/arch/*/cr_arch.h.
    
    -Paul
    
    李宏亮 wrote:
    > hello,professor:
    >
    > I am reading BLCR source code these days, when I come to the source
    > code in LIBCR, I can not understand how the user get the C/R services
    > from the CR kernel module by invoking functions in LIBCR,since the
    > system call declared in Cr_syscall.h were not implemented at all.. I
    > am confused... so I need your help
    >
    > syscall in Cr_syscall.h:
    >
    > extern int __cri_ioctl(int fd, int cmd, void * arg, int * errno_p);
    > extern int __cri_open(const char * pathname, int flags, int mode, int
    > * errno_p);
    > extern int __cri_close(int fd, int * errno_p);
    > extern int __cri_sched_yield(int * errno_p);
    > extern int __cri_nanosleep(const struct timespec * req, struct
    > timespec * rem, int * errno_p);
    > extern int __cri_exit(int code, int * errno_p);
    > extern int __cri_exit_group(int code, int * errno_p);
    > extern int __cri_ksigaction(int signum, const struct k_sigaction *act,
    > struct k_sigaction *oldact, size_t setsize, int * errno_p);
    >
    >
    > I can not find the implementaions... They are just declared....
    >
    >
    >
    >
    >
    > ===============================================
    > 快来和我一起享受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     
    

  • Next message: Claire Sonnabend: "Saw you on street!"