當前位置: 首頁>>代碼示例>>C++>>正文


C++ CALL_FN_W_WW函數代碼示例

本文整理匯總了C++中CALL_FN_W_WW函數的典型用法代碼示例。如果您正苦於以下問題:C++ CALL_FN_W_WW函數的具體用法?C++ CALL_FN_W_WW怎麽用?C++ CALL_FN_W_WW使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了CALL_FN_W_WW函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: PTH_FUNC

// pthread_rwlock_init
PTH_FUNC(int, pthreadZurwlockZuinit, // pthread_rwlock_init
              pthread_rwlock_t *rwl,
              pthread_rwlockattr_t* attr)
{
   int    ret;
   OrigFn fn;
   VALGRIND_GET_ORIG_FN(fn);
   if (TRACE_PTH_FNS) {
      fprintf(stderr, "<< pthread_rwl_init %p", rwl); fflush(stderr);
   }

   CALL_FN_W_WW(ret, fn, rwl,attr);

   if (ret == 0 /*success*/) {
      DO_CREQ_v_W(_VG_USERREQ__HG_PTHREAD_RWLOCK_INIT_POST,
                  pthread_rwlock_t*,rwl);
   } else { 
      DO_PthAPIerror( "pthread_rwlock_init", ret );
   }

   if (TRACE_PTH_FNS) {
      fprintf(stderr, " :: rwl_init -> %d >>\n", ret);
   }
   return ret;
}
開發者ID:jrmuizel,項目名稱:chronicle-recorder,代碼行數:26,代碼來源:hg_intercepts.c

示例2: I_WRAP_SONAME_FNNAME_ZZ

// TODO: Can we do additional checks?
CUresult I_WRAP_SONAME_FNNAME_ZZ(libcudaZdsoZa, cuArrayGetDescriptor)(CUDA_ARRAY_DESCRIPTOR *pArrayDescriptor, CUarray hArray) {
   OrigFn         fn;
   CUresult       result;
   CUcontext      ctx = NULL;
   cgCtxListType  *ctxNode;
   cgArrListType  *node;
   
   VALGRIND_GET_ORIG_FN(fn);
   cgLock();
   CALL_FN_W_WW(result, fn, pArrayDescriptor, hArray);
   
   // Determine context of current thread ..
   cgGetCtx(&ctx);
   // .. locate the respective ctx node ..
   ctxNode = cgFindCtx(ctx);
   // .. and finally locate the array in the context's list of arrays.
   node = cgFindArr(ctxNode, hArray);
   
   if (result == CUDA_SUCCESS && !node) {
      VALGRIND_PRINTF("cuArrayGetDescriptor returned successfully, but array not found\n");
      VALGRIND_PRINTF_BACKTRACE("   in cudagrind's internal list. Reason: Unknown\n");
   } else if (result != CUDA_SUCCESS && node) {
      VALGRIND_PRINTF("cuArrayGetDescriptor returned with error code: %d,\n", result);
      VALGRIND_PRINTF_BACKTRACE("   but array is found in cudagrind's internal list.\n");
   } else if (result != CUDA_SUCCESS) {
      VALGRIND_PRINTF("cuArrayGetDescriptor returned with error code: %d,\n", result);
      VALGRIND_PRINTF_BACKTRACE("   possible reason: Wrong context or array not previously created.\n");
   }
   
   cgUnlock();
   return result;
}
開發者ID:Grindland,項目名稱:Cudagrind,代碼行數:33,代碼來源:cuArrayGetDescriptor.c

示例3: pthread_rwlock_init_intercept

static __always_inline
int pthread_rwlock_init_intercept(pthread_rwlock_t* rwlock,
                                  const pthread_rwlockattr_t* attr)
{
   int   ret;
   OrigFn fn;
   VALGRIND_GET_ORIG_FN(fn);
   VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__PRE_RWLOCK_INIT,
                                   rwlock, 0, 0, 0, 0);
   CALL_FN_W_WW(ret, fn, rwlock, attr);
   return ret;
}
開發者ID:Zekom,項目名稱:valgrind,代碼行數:12,代碼來源:drd_pthread_intercepts.c

示例4: I_WRAP_SONAME_FNNAME_ZU

UInt I_WRAP_SONAME_FNNAME_ZU(NONE,fn_2) ( UInt a1, UInt a2 )
{
   UInt r;
   void* fn;
   VALGRIND_GET_ORIG_FN(fn);
   printf("fn_2  wrapper pre ( %d, %d )\n", (int)a1, (int)a2);
   CALL_FN_W_WW(r, fn, a1, a2);
   printf("fn_2  wrapper post1 = %d\n", (int)r);
   CALL_FN_v_WW(fn, a1, a2);
   printf("fn_2  wrapper post2 = %d\n", (int)r);
   return r;
}
開發者ID:svn2github,項目名稱:valgrind-3,代碼行數:12,代碼來源:wrap6.c

示例5: PTH_FUNC

// pthread_spin_init
PTH_FUNC(int, pthreadZuspinZuinit, // pthread_spin_init
         pthread_spinlock_t *spinlock,
         int pshared)
{
    int ret;
    int res;
    OrigFn fn;
    VALGRIND_GET_ORIG_FN(fn);
    VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__SPIN_INIT_OR_UNLOCK,
                               spinlock, mutex_type_spinlock, 0, 0, 0);
    CALL_FN_W_WW(ret, fn, spinlock, pshared);
    return ret;
}
開發者ID:svn2github,項目名稱:valgrind-3,代碼行數:14,代碼來源:drd_pthread_intercepts.c

示例6: sem_timedwait_intercept

static __always_inline
int sem_timedwait_intercept(sem_t *sem, const struct timespec *abs_timeout)
{
   int   ret;
   OrigFn fn;
   VALGRIND_GET_ORIG_FN(fn);
   VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__PRE_SEM_WAIT,
                                   sem, 0, 0, 0, 0);
   CALL_FN_W_WW(ret, fn, sem, abs_timeout);
   VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__POST_SEM_WAIT,
                                   sem, ret == 0, 0, 0, 0);
   return ret;
}
開發者ID:Zekom,項目名稱:valgrind,代碼行數:13,代碼來源:drd_pthread_intercepts.c

示例7: QT4CORE_FUNC

// QMutex::QMutex(RecursionMode) -- _ZN6QMutexC1ENS_13RecursionModeE,
QT4CORE_FUNC(void, _ZN6QMutexC1ENS_13RecursionModeE,
             void* mutex,
             qt_mutex_mode mode)
{
   int    ret;
   OrigFn fn;
   VALGRIND_GET_ORIG_FN(fn);
   VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__PRE_MUTEX_INIT,
                                   mutex, qt_to_drd_mutex_type(mode), 0, 0, 0);
   CALL_FN_W_WW(ret, fn, mutex, mode);
   VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__POST_MUTEX_INIT,
                                   mutex, 0, 0, 0, 0);
}
開發者ID:AboorvaDevarajan,項目名稱:Valgrind-tool,代碼行數:14,代碼來源:drd_qtcore_intercepts.c

示例8: pthread_spin_init_intercept

static __always_inline
int pthread_spin_init_intercept(pthread_spinlock_t *spinlock, int pshared)
{
   int ret;
   OrigFn fn;
   VALGRIND_GET_ORIG_FN(fn);
   VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__PRE_SPIN_INIT_OR_UNLOCK,
                                   spinlock, 0, 0, 0, 0);
   CALL_FN_W_WW(ret, fn, spinlock, pshared);
   VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__POST_SPIN_INIT_OR_UNLOCK,
                                   spinlock, 0, 0, 0, 0);
   return ret;
}
開發者ID:Zekom,項目名稱:valgrind,代碼行數:13,代碼來源:drd_pthread_intercepts.c

示例9: GOMP_FUNC

GOMP_FUNC(void, gompZubarrierZureinit, // gomp_barrier_reinit
          gomp_barrier_t* barrier, unsigned count)
{
    int    ret;
    int    res;
    OrigFn fn;
    VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_BARRIER_INIT,
                               barrier, gomp_barrier, count, 1, 0);
    VALGRIND_GET_ORIG_FN(fn);
    CALL_FN_W_WW(ret, fn, barrier, count);
    VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__POST_BARRIER_INIT,
                               barrier, gomp_barrier, 0, 0, 0);
}
開發者ID:svn2github,項目名稱:valgrind-3,代碼行數:13,代碼來源:drd_gomp_intercepts.c

示例10: pthread_cond_wait_intercept

static __always_inline
int pthread_cond_wait_intercept(pthread_cond_t *cond, pthread_mutex_t *mutex)
{
   int   ret;
   OrigFn fn;
   VALGRIND_GET_ORIG_FN(fn);
   VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__PRE_COND_WAIT,
                                   cond, mutex, DRD_(mutex_type)(mutex), 0, 0);
   CALL_FN_W_WW(ret, fn, cond, mutex);
   VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__POST_COND_WAIT,
                                   cond, mutex, 1, 0, 0);
   return ret;
}
開發者ID:Zekom,項目名稱:valgrind,代碼行數:13,代碼來源:drd_pthread_intercepts.c

示例11: pthread_cond_init_intercept

static __always_inline
int pthread_cond_init_intercept(pthread_cond_t* cond,
                                const pthread_condattr_t* attr)
{
   int ret;
   OrigFn fn;
   VALGRIND_GET_ORIG_FN(fn);
   VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__PRE_COND_INIT,
                                   cond, 0, 0, 0, 0);
   CALL_FN_W_WW(ret, fn, cond, attr);
   VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__POST_COND_INIT,
                                   cond, 0, 0, 0, 0);
   return ret;
}
開發者ID:Zekom,項目名稱:valgrind,代碼行數:14,代碼來源:drd_pthread_intercepts.c

示例12: VG_WRAP_FUNCTION_ZZ

void* VG_WRAP_FUNCTION_ZZ(dyld, ZuZZN4dyld18fastBindLazySymbolEPP11ImageLoaderm)
     (void** imageLoaderCache, uintptr_t lazyBindingInfoOffset)
{
   void* res;
   OrigFn fn;

   VALGRIND_GET_ORIG_FN(fn);

   ANNOTATE_IGNORE_READS_AND_WRITES_BEGIN();
   CALL_FN_W_WW(res, fn, imageLoaderCache, lazyBindingInfoOffset);
   ANNOTATE_IGNORE_READS_AND_WRITES_END();

   return res;
}
開發者ID:qtekfun,項目名稱:htcDesire820Kernel,代碼行數:14,代碼來源:drd_darwin_intercepts.c

示例13: pthread_rwlock_timedwrlock_intercept

static __always_inline
int pthread_rwlock_timedwrlock_intercept(pthread_rwlock_t* rwlock,
                                         const struct timespec *timeout)
{
   int   ret;
   OrigFn fn;
   VALGRIND_GET_ORIG_FN(fn);
   VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__PRE_RWLOCK_WRLOCK,
                                   rwlock, 0, 0, 0, 0);
   CALL_FN_W_WW(ret, fn, rwlock, timeout);
   VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__POST_RWLOCK_WRLOCK,
                                   rwlock, ret == 0, 0, 0, 0);
   return ret;
}
開發者ID:AboorvaDevarajan,項目名稱:valgrind,代碼行數:14,代碼來源:drd_pthread_intercepts.c

示例14: I_WRAP_SONAME_FNNAME_ZU

long I_WRAP_SONAME_FNNAME_ZU(NONE,foo) (long x, long y)
{

	OrigFn fn;
	VALGRIND_GET_ORIG_FN(fn);

	printf("WRAPPER: foo(%ld, %ld);\n", x, y);

	long result;
	CALL_FN_W_WW(result, fn, x,y);
	printf("WRAPPER: return %ld;\n", result);

	return result;
}
開發者ID:LeonardKoenig,項目名稱:valgrind_hooking,代碼行數:14,代碼來源:hook.c

示例15: PTH_FUNC

// pthread_rwlock_init
PTH_FUNC(int,
         pthreadZurwlockZuinitZa, // pthread_rwlock_init*
         pthread_rwlock_t* rwlock,
         const pthread_rwlockattr_t* attr)
{
   int   ret;
   int   res;
   OrigFn fn;
   VALGRIND_GET_ORIG_FN(fn);
   VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_RWLOCK_INIT,
                              rwlock, 0, 0, 0, 0);
   CALL_FN_W_WW(ret, fn, rwlock, attr);
   return ret;
}
開發者ID:svn2github,項目名稱:valgrind-3,代碼行數:15,代碼來源:drd_pthread_intercepts.c


注:本文中的CALL_FN_W_WW函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。