Add batch (no input thread) mode to emulator.

This commit is contained in:
cdkersey
2015-10-22 10:23:03 -06:00
parent 6f91ac27d3
commit 16ef49b63e
5 changed files with 14 additions and 8 deletions

View File

@@ -187,11 +187,15 @@ void *Harp::consoleInputThread(void* arg_vp) {
exit(4);
}
ConsoleMemDevice::ConsoleMemDevice(Size wS, std::ostream &o, Core &core) :
ConsoleMemDevice::ConsoleMemDevice(Size wS, std::ostream &o, Core &core,
bool batch) :
wordSize(wS), output(o), core(core), cBuf()
{
pthread_t *thread = new pthread_t;
pthread_create(thread, NULL, consoleInputThread, (void*)this);
// Create a console input thread if we are running in interactive mode.
if (!batch) {
pthread_t *thread = new pthread_t;
pthread_create(thread, NULL, consoleInputThread, (void*)this);
}
pthread_mutex_init(&cBufLock, NULL);
}