Exemplo n.º 1
0
static void _rwv_cycle(struct fixture *f, uint64_t b, uint64_t e)
{
	uint8_t pat = _random_pattern();

	_verify(f, b, e, INIT_PATTERN);
	_do_write(f, b, e, pat); 
	_reopen(f);
	_verify(f, b < 128 ? 0 : b - 128, b, INIT_PATTERN);
	_verify(f, b, e, pat);
	_verify(f, e, _min(e + 128, _max_byte()), INIT_PATTERN);
}
Exemplo n.º 2
0
void edthreaded_fd::_exec()
{
	bool running = true;
    while (running)
    {
		m_wait_timer->update();

		if (!m_wait_timer->running())
			_do_write();
		_do_read();

		pthread_mutex_lock(&m_running_lock);
		running = m_running;
		pthread_mutex_unlock(&m_running_lock);
    }
    pthread_exit(nullptr);
}