Skip to content
Snippets Groups Projects
Commit 039e2a69 authored by Jonathan Hanks's avatar Jonathan Hanks
Browse files

Fix to forward port from branch 3.x start frame_io threads.

The actual frame writing is done in distinct threads.  Make sure the
threads get started.

git-svn-id: https://redoubt.ligo-wa.caltech.edu/svn/advLigoRTS/trunk@4394 6dcd42c9-f523-4c6d-aada-af552506706e
parent 6d1d7124
No related branches found
No related tags found
No related merge requests found
......@@ -919,10 +919,37 @@ daqd_c::framer (int science)
_buf.release();
}
// error message buffer
char errmsgbuf[80];
// error message buffer
char errmsgbuf[80];
// Startup the IO thread
{
DEBUG(4, cerr << "starting " << (science ? "science" : "full") << " framer IO thread" << endl);
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setstacksize(&attr, daqd.thread_stack_size);
pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);
int err = 0;
if (science) {
err = pthread_create( &science_frame_saver_io_tid, &attr,
(void *(*)(void *))daqd_c::science_framer_io_static,
(void *)this);
} else {
err = pthread_create( &frame_saver_io_tid, &attr,
(void *(*)(void *))daqd_c::framer_io_static,
(void *)this);
}
if (err) {
pthread_attr_destroy(&attr);
system_log(1, "pthread_create() err=%d while creating %s IO thread", err, (science ? "science" : "full"));
exit(1);
}
pthread_attr_destroy(&attr);
}
// Set thread parameters. Make sure this is done after starting the io threads.
// Set thread parameters. Make sure this is done after starting the io threads.
if (science) {
daqd_c::set_thread_priority("Science frame saver","dqscifr",SAVER_THREAD_PRIORITY,SCIENCE_SAVER_CPUAFFINITY);
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment