当前位置: 首页>>代码示例>>C++>>正文


C++ FUNCTION_EXIT函数代码示例

本文整理汇总了C++中FUNCTION_EXIT函数的典型用法代码示例。如果您正苦于以下问题:C++ FUNCTION_EXIT函数的具体用法?C++ FUNCTION_EXIT怎么用?C++ FUNCTION_EXIT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了FUNCTION_EXIT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: XenBus_DeviceFileInit

NTSTATUS
XenBus_DeviceFileInit(WDFDEVICE device, PWDF_IO_QUEUE_CONFIG queue_config, WDFFILEOBJECT file_object)
{
  NTSTATUS status;
  PXENPCI_DEVICE_INTERFACE_DATA xpdid = GetXpdid(file_object);
  WDF_IO_QUEUE_CONFIG internal_queue_config;
  
  FUNCTION_ENTER();

  xpdid->EvtFileCleanup = XenBus_EvtFileCleanup;  
  xpdid->EvtFileClose = XenBus_EvtFileClose;
  queue_config->EvtIoRead = XenBus_EvtIoRead;
  queue_config->EvtIoWrite = XenBus_EvtIoWrite;
  // queue_config->EvtIoDeviceControl = XenBus_EvtIoDeviceControl;
  
  InitializeListHead(&xpdid->xenbus.read_list_head);
  InitializeListHead(&xpdid->xenbus.watch_list_head);
  xpdid->xenbus.len = 0;
  WDF_IO_QUEUE_CONFIG_INIT(&internal_queue_config, WdfIoQueueDispatchManual);
  
  status = WdfIoQueueCreate(device, &internal_queue_config, WDF_NO_OBJECT_ATTRIBUTES, &xpdid->xenbus.io_queue);
  if (!NT_SUCCESS(status)) {
    KdPrint(("Error creating queue 0x%x\n", status));
    FUNCTION_EXIT();
    return status;
  }
  
  FUNCTION_EXIT();
  
  return status;
}
开发者ID:qiaohaiming,项目名称:xen-pv-windows-evtchn,代码行数:31,代码来源:xenbus_device_interface.c

示例2: mng_read_data_callback

static mng_bool
mng_read_data_callback (mng_handle mng_h,
			mng_ptr buffer,
			mng_uint32 bytes_requested,
        		mng_uint32 * bytes_read)
{
    FUNCTION_ENTRY();
    *bytes_read = 0;
    return MNG_FALSE;
  guint available_mng_food;

  GtkMngView * mng_view = GTK_MNG_VIEW (mng_get_userdata (mng_h));

  available_mng_food = mng_view->bytes_to_eat - mng_view->bytes_eaten;
  if (available_mng_food > 0 && mng_view->mng_food != NULL)
    {
      * bytes_read = (mng_uint32) MIN ((mng_uint32) available_mng_food, bytes_requested);
      memcpy (buffer, mng_view->mng_food + mng_view->bytes_eaten, * bytes_read);
      mng_view->bytes_eaten += * bytes_read;
      FUNCTION_EXIT();
      return MNG_TRUE;
    }
  else {
      FUNCTION_EXIT();
    return MNG_FALSE;
  }
}
开发者ID:AlexKordic,项目名称:sandbox,代码行数:27,代码来源:gtk-mng-view.c

示例3: XenUsb_DeviceCallback

VOID
XenUsb_DeviceCallback(PVOID context, ULONG callback_type, PVOID value) {
  PXENUSB_DEVICE_DATA xudd = (PXENUSB_DEVICE_DATA)context;
  ULONG state;
  
  FUNCTION_ENTER();
  switch (callback_type) {
  case XN_DEVICE_CALLBACK_BACKEND_STATE:
    state = (ULONG)(ULONG_PTR)value;
    if (state == xudd->backend_state) {
      FUNCTION_MSG("same state %d\n", state);
      FUNCTION_EXIT();
    }
    FUNCTION_MSG("XenBusState = %d -> %d\n", xudd->backend_state, state);
    xudd->backend_state = state;
    KeSetEvent(&xudd->backend_event, 0, FALSE);
    break;
  case XN_DEVICE_CALLBACK_SUSPEND:
    FUNCTION_MSG("XN_DEVICE_CALLBACK_SUSPEND");
    XenUsb_Disconnect(xudd, TRUE);
    break;
  case XN_DEVICE_CALLBACK_RESUME:
    FUNCTION_MSG("XN_DEVICE_CALLBACK_RESUME");
    xudd->device_state = DEVICE_STATE_INITIALISING;
    XenUsb_Connect(xudd, TRUE);
    // some sort of notify to kick things off?
    break;
  }
  FUNCTION_EXIT();
}
开发者ID:alexp206,项目名称:win-pvdrivers-mirror,代码行数:30,代码来源:xenusb_fdo.c

示例4: gtk_mng_view_init_libmng

static gboolean
gtk_mng_view_init_libmng (GtkMngView * mng_view)
{
    FUNCTION_ENTRY();
  GtkWidget * widget;

  g_return_val_if_fail (IS_GTK_MNG_VIEW (mng_view), FALSE);

  if (mng_view->MNG_handle)
    mng_cleanup (&mng_view->MNG_handle);

  mng_view->MNG_handle = mng_initialize (mng_view,
					 mng_malloc_callback,
					 mng_free_callback,
					 MNG_NULL);

  if (mng_view->MNG_handle == MNG_NULL) {
      FUNCTION_EXIT();
    return FALSE;
  }

  mng_set_storechunks(mng_view->MNG_handle, MNG_TRUE);
  //mng_set_dfltimggamma(mng_view->MNG_handle, 5);
  //mng_set_displaygamma(mng_view->MNG_handle, 4);
  if (mng_setcb_openstream (mng_view->MNG_handle, mng_open_stream_callback) != MNG_NOERROR ||
      mng_setcb_closestream (mng_view->MNG_handle, mng_close_stream_callback) != MNG_NOERROR ||
      mng_setcb_readdata (mng_view->MNG_handle, mng_read_data_callback) != MNG_NOERROR ||
      mng_setcb_processheader (mng_view->MNG_handle, mng_process_header_callback) != MNG_NOERROR ||
      mng_setcb_processmend (mng_view->MNG_handle, mng_process_mend_callback) != MNG_NOERROR ||
      mng_setcb_processterm (mng_view->MNG_handle, mng_process_term_callback) != MNG_NOERROR ||
      mng_setcb_settimer (mng_view->MNG_handle, mng_set_timer_callback) != MNG_NOERROR ||
      mng_setcb_gettickcount (mng_view->MNG_handle, mng_get_tickcount_callback) != MNG_NOERROR ||
      mng_setcb_getcanvasline (mng_view->MNG_handle, mng_get_canvas_line_callback) != MNG_NOERROR ||
      mng_setcb_getalphaline (mng_view->MNG_handle, mng_get_alpha_line_callback) != MNG_NOERROR ||
      mng_setcb_refresh (mng_view->MNG_handle, mng_refresh_callback) != MNG_NOERROR)
    {
      mng_cleanup (&mng_view->MNG_handle);
      FUNCTION_EXIT();
      return FALSE;
    }

      //mng_set_suspensionmode(mng_view->MNG_handle, MNG_TRUE);
  mng_set_canvasstyle (mng_view->MNG_handle, MNG_CANVAS_RGB8_A8);

  widget = GTK_WIDGET (mng_view);

  if (!GTK_WIDGET_REALIZED (widget))
    gtk_widget_realize (widget);

  mng_set_bgcolor (mng_view->MNG_handle,
		   widget->style->bg[GTK_STATE_NORMAL].red,
		   widget->style->bg[GTK_STATE_NORMAL].green,
		   widget->style->bg[GTK_STATE_NORMAL].blue);
  FUNCTION_EXIT();
  return TRUE;
}
开发者ID:AlexKordic,项目名称:sandbox,代码行数:56,代码来源:gtk-mng-view.c

示例5: mng_close_stream_callback

static mng_bool
mng_close_stream_callback (mng_handle mng_h)
{
    FUNCTION_ENTRY();
    FUNCTION_EXIT();
  return MNG_TRUE;
}
开发者ID:AlexKordic,项目名称:sandbox,代码行数:7,代码来源:gtk-mng-view.c

示例6: gtk_mng_view_expose

static gboolean
gtk_mng_view_expose (GtkWidget * widget, GdkEventExpose * event)
{
    FUNCTION_ENTRY();
  g_return_val_if_fail (IS_GTK_MNG_VIEW (widget), FALSE);
  g_return_val_if_fail (event != NULL, FALSE);

  if (GTK_WIDGET_REALIZED (widget))
    {
      GdkRectangle dummy;
      GdkRectangle rectangle;
      GtkMngView * mng_view;

      mng_view = GTK_MNG_VIEW (widget);
      dummy.x = dummy.y = 0;
      dummy.width = mng_view->width;
      dummy.height = mng_view->height;

      if (gdk_rectangle_intersect (&dummy, &event->area, &rectangle))
        gtk_mng_view_paint (mng_view, &rectangle);
      mng_display_resume(mng_view->MNG_handle);
    }
  FUNCTION_EXIT();
  return FALSE;
}
开发者ID:AlexKordic,项目名称:sandbox,代码行数:25,代码来源:gtk-mng-view.c

示例7: mng_malloc_callback

static mng_ptr
mng_malloc_callback (mng_size_t how_many)
{
    FUNCTION_ENTRY();
    FUNCTION_EXIT();
  return (mng_ptr) g_new0 (gchar, how_many);
}
开发者ID:AlexKordic,项目名称:sandbox,代码行数:7,代码来源:gtk-mng-view.c

示例8: XenNet_SetInformation

NDIS_STATUS
XenNet_SetInformation(
    NDIS_HANDLE adapter_context,
    NDIS_OID oid,
    PVOID information_buffer,
    ULONG information_buffer_length,
    PULONG bytes_read,
    PULONG bytes_needed) {
  NTSTATUS status;
  int i;
  
  FUNCTION_ENTER();
  for (i = 0; xennet_oids[i].oid && xennet_oids[i].oid != oid; i++);

  if (!xennet_oids[i].oid) {
    FUNCTION_MSG("Unsupported OID %08x\n", oid);
    return NDIS_STATUS_NOT_SUPPORTED;
  }
  if (information_buffer_length < xennet_oids[i].min_length) {
    FUNCTION_MSG("%s Set InformationBufferLength %d < min_length %d\n", xennet_oids[i].oid_name, information_buffer_length, xennet_oids[i].min_length);
    *bytes_needed = xennet_oids[i].min_length;
    return NDIS_STATUS_BUFFER_TOO_SHORT;
  }
  if (!xennet_oids[i].set_routine) {
    FUNCTION_MSG("%s Set not supported\n", xennet_oids[i].oid_name);
    return NDIS_STATUS_NOT_SUPPORTED;
  }
  FUNCTION_MSG("%s\n", xennet_oids[i].oid_name);
  status = xennet_oids[i].set_routine(adapter_context, information_buffer, information_buffer_length, bytes_read, bytes_needed);
  FUNCTION_EXIT();
  return status;
}
开发者ID:alexp206,项目名称:win-pvdrivers-mirror,代码行数:32,代码来源:xennet_oid.c

示例9: GMM001_realloc

/*
 * This function changes the size of a block of memory that was previously allocated with malloc().
 */
void * GMM001_realloc (uint32_t size, void * MemPtr)
{
  void * MemPtr1 = NULL;
  FUNCTION_ENTRY(GID_GMM001, (uint32_t)GMM001_FUNCTION_ENTRY);

/*<<<DD_GMM001_API_3_1>>>*/   
  if (((uint32_t)MemPtr >= (uint32_t)Heap_Bank1_Start) && ((uint32_t)MemPtr <= ((uint32_t)Heap_Bank1_Start + LENGTH1)))
  {
	  MemPtr1 = LMM001_realloc(&GMM001_handle0, MemPtr, size);
  }

/*<<<DD_GMM001_API_3_2>>>*/   
  else if (((uint32_t)MemPtr >= (uint32_t)Heap_Bank2_Start) && ((uint32_t)MemPtr <= ((uint32_t)Heap_Bank2_Start + LENGTH2)))
  {
 	  MemPtr1 = LMM001_realloc(&GMM001_handle1, MemPtr, size);
  }

/*<<<DD_GMM001_API_3_3>>>*/   
  else if (((uint32_t)MemPtr >= (uint32_t)Heap_Bank3_Start) && ((uint32_t)MemPtr <= ((uint32_t)Heap_Bank3_Start + LENGTH3)))
  {
 	  MemPtr1 = LMM001_realloc(&GMM001_handle2, MemPtr, size);
  }
  FUNCTION_EXIT(GID_GMM001, (uint32_t)GMM001_FUNCTION_EXIT);
  return MemPtr1;
}
开发者ID:uSasha,项目名称:Webserver_XMC4500_RelaxKit,代码行数:28,代码来源:GMM001.c

示例10: gtk_mng_view_new

GtkMngView *
gtk_mng_view_new (void)
{
    FUNCTION_ENTRY();
    FUNCTION_EXIT();
  return GTK_MNG_VIEW (g_object_new(GTK_MNG_VIEW_TYPE, NULL));
}
开发者ID:AlexKordic,项目名称:sandbox,代码行数:7,代码来源:gtk-mng-view.c

示例11: XenNet_ResumeWorkItem

static VOID
XenNet_ResumeWorkItem(PDEVICE_OBJECT device_object, PVOID context)
{
  struct xennet_info *xi = context;
  KIRQL old_irql;
  
  UNREFERENCED_PARAMETER(device_object);
  
  FUNCTION_ENTER();

  ASSERT(xi->resume_work_item);

  IoFreeWorkItem(xi->resume_work_item);
  
  XenNet_TxResumeStart(xi);
  XenNet_RxResumeStart(xi);
  XenNet_ConnectBackend(xi);
  XenNet_RxResumeEnd(xi);
  XenNet_TxResumeEnd(xi);

  KeAcquireSpinLock(&xi->resume_lock, &old_irql);
  xi->resume_work_item = NULL;
  KdPrint((__DRIVER_NAME "     *Setting suspend_resume_state_fdo = %d\n", xi->device_state->suspend_resume_state_pdo));
  xi->device_state->suspend_resume_state_fdo = xi->device_state->suspend_resume_state_pdo;
  KdPrint((__DRIVER_NAME "     *Notifying event channel %d\n", xi->device_state->pdo_event_channel));
  xi->vectors.EvtChn_Notify(xi->vectors.context, xi->device_state->pdo_event_channel);
  KeReleaseSpinLock(&xi->resume_lock, old_irql);

  FUNCTION_EXIT();

}
开发者ID:stilltracy,项目名称:LICMX-Win,代码行数:31,代码来源:xennet5.c

示例12: XenPci_HighSync

VOID
XenPci_HighSync(PXENPCI_HIGHSYNC_FUNCTION function0, PXENPCI_HIGHSYNC_FUNCTION functionN, PVOID context)
{
  ULONG ActiveProcessorCount;
  ULONG i;
  highsync_info_t *highsync_info;
  KIRQL old_irql;

  UNREFERENCED_PARAMETER(context);
  FUNCTION_ENTER();

  highsync_info = ExAllocatePoolWithTag(NonPagedPool, sizeof(highsync_info_t), XENPCI_POOL_TAG);
  RtlZeroMemory(highsync_info, sizeof(highsync_info_t));
  KeInitializeEvent(&highsync_info->highsync_complete_event, SynchronizationEvent, FALSE);
  highsync_info->function0 = function0;
  highsync_info->functionN = functionN;
  highsync_info->context = context;
  highsync_info->sync_level = HIGH_LEVEL;

#if (NTDDI_VERSION >= NTDDI_WINXP)
  ActiveProcessorCount = (ULONG)KeNumberProcessors;
#else
  ActiveProcessorCount = (ULONG)*KeNumberProcessors;
#endif

  /* Go to HIGH_LEVEL to prevent any races with Dpc's on the current processor */
  KeRaiseIrql(highsync_info->sync_level, &old_irql);

  highsync_info->do_spin = TRUE;
  for (i = 0; i < ActiveProcessorCount; i++)
  {
    if (i == 0)
      KeInitializeDpc(&highsync_info->dpcs[i], XenPci_HighSyncCallFunction0, highsync_info);
    else
      KeInitializeDpc(&highsync_info->dpcs[i], XenPci_HighSyncCallFunctionN, highsync_info);
    KeSetTargetProcessorDpc(&highsync_info->dpcs[i], (CCHAR)i);
    KeSetImportanceDpc(&highsync_info->dpcs[i], HighImportance);
    KdPrint((__DRIVER_NAME "     queuing Dpc for CPU %d\n", i));
    KeInsertQueueDpc(&highsync_info->dpcs[i], NULL, NULL);
  }
  KdPrint((__DRIVER_NAME "     All Dpc's queued\n"));

  KeMemoryBarrier();
  KeLowerIrql(old_irql);

  KdPrint((__DRIVER_NAME "     Waiting for highsync_complete_event\n"));
  KeWaitForSingleObject(&highsync_info->highsync_complete_event, Executive, KernelMode, FALSE, NULL);
#if (NTDDI_VERSION >= NTDDI_WINXP)
  KeFlushQueuedDpcs();
#else
  {
    /* just wait 1 second until all DPC's finish - not ideal but it's only for W2K */
    LARGE_INTEGER interval;
    interval.QuadPart = -1 * 1000 * 1000 * 10; /* 1 second */
    KeDelayExecutionThread(KernelMode, FALSE, &interval);
  }
#endif
  ExFreePoolWithTag(highsync_info, XENPCI_POOL_TAG);
  FUNCTION_EXIT();
}
开发者ID:B-Rich,项目名称:smart,代码行数:60,代码来源:xenpci_highsync.c

示例13: PutRequestsOnRing

/* called with urb ring lock held */
static VOID
PutRequestsOnRing(PXENUSB_DEVICE_DATA xudd) {
  partial_pvurb_t *partial_pvurb;
  uint16_t id;
  int notify;

  FUNCTION_ENTER();
  FUNCTION_MSG("IRQL = %d\n", KeGetCurrentIrql());

  while ((partial_pvurb = (partial_pvurb_t *)RemoveHeadList((PLIST_ENTRY)&xudd->partial_pvurb_queue)) != (partial_pvurb_t *)&xudd->partial_pvurb_queue) {
    FUNCTION_MSG("partial_pvurb = %p\n", partial_pvurb);
    /* if this partial_pvurb is cancelling another we don't need to check if the cancelled partial_pvurb is on the ring - that is taken care of in HandleEvent */
    id = get_id_from_freelist(xudd->req_id_ss);
    if (id == (uint16_t)-1) {
      FUNCTION_MSG("no free ring slots\n");
      InsertHeadList(&xudd->partial_pvurb_queue, &partial_pvurb->entry);
      break;
    }
    InsertTailList(&xudd->partial_pvurb_ring, &partial_pvurb->entry);
    xudd->partial_pvurbs[id] = partial_pvurb;
    partial_pvurb->req.id = id;    
    *RING_GET_REQUEST(&xudd->urb_ring, xudd->urb_ring.req_prod_pvt) = partial_pvurb->req;
    xudd->urb_ring.req_prod_pvt++;
  }
  RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(&xudd->urb_ring, notify);
  if (notify) {
    FUNCTION_MSG("Notifying\n");
    XnNotify(xudd->handle, xudd->event_channel);
  }
  
  FUNCTION_EXIT();
}
开发者ID:alexp206,项目名称:win-pvdrivers-mirror,代码行数:33,代码来源:xenusb_fdo.c

示例14: XenPci_DoPatchKernel0

static VOID
XenPci_DoPatchKernel0(PVOID context) {
  patch_info_t *pi = context;
  ULONG i;
  ULONG high_level_tpr;
  ULONG patch_position_index = 0;
  ULONG potential_patch_position_index = 0;

  FUNCTION_ENTER();

  high_level_tpr = SaveTpr();
  /* we know all the other CPUs are at HIGH_LEVEL so set them all to the same as cpu 0 */
  for (i = 1; i < MAX_VIRT_CPUS; i++)
    SaveTprProcValue(i, high_level_tpr);

  /* we can't use KdPrint while patching as it may involve the TPR while we are patching it */
  for (i = 0; i < pi->length; i++) {
    if (XenPci_TestAndPatchInstruction((PUCHAR)pi->base + i)) {
      patch_positions[patch_position_index++] = (PUCHAR)pi->base + i;
    } else if (*(PULONG)((PUCHAR)pi->base + i) == LAPIC_TASKPRI) {
      potential_patch_positions[potential_patch_position_index++] = (PUCHAR)pi->base + i;
    }
  }

  for (i = 0; i < patch_position_index; i++)
    FUNCTION_MSG("Patch added at %p\n", patch_positions[i]);

  for (i = 0; i < potential_patch_position_index; i++)
    FUNCTION_MSG("Unpatch TPR address found at %p\n", potential_patch_positions[i]);

  FUNCTION_EXIT();
}
开发者ID:alexp206,项目名称:win-pvdrivers-mirror,代码行数:32,代码来源:xenpci_patch_kernel.c

示例15: XenBus_EvtFileCleanup

static VOID
XenBus_EvtFileCleanup(WDFFILEOBJECT file_object)
{
  PXENPCI_DEVICE_INTERFACE_DATA xpdid = GetXpdid(file_object);
  PXENPCI_DEVICE_DATA xpdd = GetXpdd(WdfFileObjectGetDevice(file_object));
  watch_context_t *watch_context;
  KIRQL old_irql;
  PCHAR msg;

  FUNCTION_ENTER();

  KeAcquireSpinLock(&xpdid->lock, &old_irql);

  while (!IsListEmpty(&xpdid->xenbus.watch_list_head))
  {
    watch_context = (watch_context_t *)RemoveHeadList(&xpdid->xenbus.watch_list_head);
    KeReleaseSpinLock(&xpdid->lock, old_irql);
    msg = XenBus_RemWatch(xpdd, XBT_NIL, watch_context->path, XenPci_IoWatch, watch_context);
    if (msg != NULL)
    {
      KdPrint((__DRIVER_NAME "     Error freeing watch (%s)\n", msg));
      XenPci_FreeMem(msg);
    }
    ExFreePoolWithTag(watch_context, XENPCI_POOL_TAG);
    WdfObjectDereference(file_object);
    KeAcquireSpinLock(&xpdid->lock, &old_irql);
  }

  KeReleaseSpinLock(&xpdid->lock, old_irql);
  
  FUNCTION_EXIT();
}
开发者ID:qiaohaiming,项目名称:xen-pv-windows-evtchn,代码行数:32,代码来源:xenbus_device_interface.c


注:本文中的FUNCTION_EXIT函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。