Example #1
0
void tcp_client::run()
{
	tcp_session::run();
	{
		boost::mutex::scoped_lock lock( m_mutex );
		if( !m_isconnected && m_isreconnect && !m_isconnecting && m_isinitconncted )
		{
			unsigned int now = (unsigned int)time( NULL );
			if( now - m_last_reconnect_time > m_reconnect_time )
				reconnect();
		}
	}

	m_cb_mgr.poll();
	int proc_index = 0;

	m_msg_mutex.lock();
	if( m_queue_recv_msg[m_current_recv_queue].empty() )
	{
		m_msg_mutex.unlock();
		cpu_wait();
		return;
	}
	proc_index = m_current_recv_queue;
	m_current_recv_queue = !m_current_recv_queue;
	m_msg_mutex.unlock();

	while( !m_queue_recv_msg[proc_index].empty() )
	{
		message_t* msg = m_queue_recv_msg[proc_index].front();
		proc_message( *msg );
		net_global::free_message( msg );
		m_queue_recv_msg[proc_index].pop();
	}
}
Example #2
0
static void ath79_restart(char *command)
{
    ath79_device_reset_set(AR71XX_RESET_FULL_CHIP);
    for (;;)
        if (cpu_wait)
            cpu_wait();
}
Example #3
0
static void ls1x_halt(void)
{
	while (1) {
		if (cpu_wait)
			cpu_wait();
	}
}
Example #4
0
void arch_cpu_idle(void)
{
	if (cpu_wait)
		cpu_wait();
	else
		local_irq_enable();
}
void pnx8550_machine_halt(void)
{
	while (1) {
		if (cpu_wait)
			cpu_wait();
	}
}
Example #6
0
static void rt3883_restart(char *command)
{
	rt3883_sysc_wr(RT3883_RSTCTRL_SYS, RT3883_SYSC_REG_RSTCTRL);
	while (1)
		if (cpu_wait)
			cpu_wait();
}
Example #7
0
File: setup.c Project: 4pao/openwrt
static void rt305x_restart(char *command)
{
	rt305x_sysc_wr(RT305X_RESET_SYSTEM, SYSC_REG_RESET_CTRL);
	while (1)
		if (cpu_wait)
			cpu_wait();
}
Example #8
0
/* Deprecated ,was used by dpm */
void jz_pm_idle(void)
{
	local_irq_disable();
	if (!need_resched()) {
		local_irq_enable();
		cpu_wait();
	}
}
Example #9
0
static void adm5120_halt(void)
{
	local_irq_disable();

	while (1) {
		if (cpu_wait)
			cpu_wait();
	}
}
void wrppmc_machine_halt(void)
{
	local_irq_disable();

	printk(KERN_NOTICE "You can safely turn off the power\n");
	while (1) {
		if (cpu_wait)
			cpu_wait();
	}
}
Example #11
0
static void nlm_linux_exit(void)
{
	nlm_reg_t *mmio;

	mmio = netlogic_io_mmio(NETLOGIC_IO_GPIO_OFFSET);
	/* trigger a chip reset by writing 1 to GPIO_SWRESET_REG */
	netlogic_write_reg(mmio, NETLOGIC_GPIO_SWRESET_REG, 1);
	for ( ; ; )
		cpu_wait();
}
Example #12
0
File: setup.c Project: 7L/pi_plus
static void nlm_linux_exit(void)
{
	uint64_t gpiobase;

	gpiobase = nlm_mmio_base(NETLOGIC_IO_GPIO_OFFSET);
	/* trigger a chip reset by writing 1 to GPIO_SWRESET_REG */
	nlm_write_reg(gpiobase, GPIO_SWRESET_REG, 1);
	for ( ; ; )
		cpu_wait();
}
void cobalt_machine_halt(void)
{
	/*
	 * turn on power off LED on RaQ
	 */
	led_trigger_event(power_off_led_trigger, LED_FULL);

	local_irq_disable();
	while (1) {
		if (cpu_wait)
			cpu_wait();
	}
}
Example #14
0
static void gpr_reset(char *c)
{
	/* switch System-LED to orange (red# and green# on) */
	alchemy_gpio_direction_output(4, 0);
	alchemy_gpio_direction_output(5, 0);

	/* trigger watchdog to reset board in 200ms */
	printk(KERN_EMERG "Triggering watchdog soft reset...\n");
	raw_local_irq_disable();
	alchemy_gpio_direction_output(1, 0);
	udelay(1);
	alchemy_gpio_set_value(1, 1);
	while (1)
		cpu_wait();
}
Example #15
0
static void rt3883_halt(void)
{
	while (1)
		if (cpu_wait)
			cpu_wait();
}
Example #16
0
static void ath79_halt(void)
{
    while (1)
        cpu_wait();
}
Example #17
0
static void gpr_power_off(void)
{
	while (1)
		cpu_wait();
}
Example #18
0
static void rt288x_halt(void)
{
	while (1)
		cpu_wait();
}