gonzui


Format: Advanced Search

tkernel_2/lib/libtk/src/call.hbare sourcepermlink (0.00 seconds)

Search this content:

    1: /*
    2:  *----------------------------------------------------------------------
    3:  *    T-Kernel 2.0 Software Package
    4:  *
    5:  *    Copyright 2011 by Ken Sakamura.
    6:  *    This software is distributed under the latest version of T-License 2.x.
    7:  *----------------------------------------------------------------------
    8:  *
    9:  *    Released by T-Engine Forum(http://www.t-engine.org/) at 2011/05/17.
   10:  *    Modified by TRON Forum(http://www.tron.org/) at 2015/06/01.
   11:  *
   12:  *----------------------------------------------------------------------
   13:  */
   14: 
   15: /*
   16:  *      @(#)call.h (libtk)
   17:  *
   18:  *      Kernel function call
   19:  */
   20: 
   21: #include <basic.h>
   22: #include <tk/syscall.h>
   23: #include <sys/commarea.h>
   24: 
   25: #if TA_GP
   26: 
   27: IMPORT INT _CallKernelFunc( INT p1, INT p2, FP func, void *gp );
   28: 
   29: #define CallKernelFunc(func, p1, p2)    \
   30:         _CallKernelFunc((INT)(p1), (INT)(p2), (FP)(func), __CommArea->gp)
   31: 
   32: #else /* TA_GP */
   33: 
   34: #define CallKernelFunc(func, p1, p2)    (*func)(p1, p2)
   35: 
   36: #endif /* TA_GP */