示例#1
0
static gboolean
ik_process_eq_callback (gpointer user_data)
{
  gboolean res;
  
  /* Try and move as many events to the event queue */
  G_LOCK (inotify_lock);
  ik_process_events ();
  
  while (!g_queue_is_empty (event_queue))
    {
      ik_event_t *event = g_queue_pop_head (event_queue);
      
      user_cb (event);
    }

  res = TRUE;
  
  if (g_queue_get_length (events_to_process) == 0)
    {
      process_eq_running = FALSE;
      res = FALSE;
    }
  
  G_UNLOCK (inotify_lock);
  
  return res;
}
示例#2
0
static void wdog_cmsdk_apb_isr(void)
{
	/*
	 * Check if the watchdog was the reason of the NMI interrupt
	 * and if not, exit immediately
	 */
	if (!wdog_cmsdk_apb_has_fired()) {
		printk("NMI received! Rebooting...\n");
		/* In ARM implementation sys_reboot ignores the parameter */
		sys_reboot(0);
	} else {
		if (user_cb != NULL) {
			user_cb(wdog_r, 0);
		}
	}
}
示例#3
0
void destroy_request(sba_request_t *request)
{
	void (*user_cb)(struct sba_request *);
	if (request->priv_data) {
		user_cb = request->priv_data;
		user_cb(request);
	}
	switch (request->request_type) {
	case SBA_TRANSFER:
	case SBA_TX:
		if (request->tx_buff) bfree(request->tx_buff);
		break;
	default:
		break;
	}
	bfree(request);
}
示例#4
0
static void interrupt_callback(void)
{
	if (user_cb)
		user_cb(wdt_qmsi_isr_dev);
}