Chris@96: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@96: Chris@96: /* Chris@96: Sonic Visualiser Chris@96: An audio file viewer and annotation editor. Chris@96: Centre for Digital Music, Queen Mary, University of London. Chris@96: This file copyright 2006 Chris Cannam. Chris@96: Chris@96: This program is free software; you can redistribute it and/or Chris@96: modify it under the terms of the GNU General Public License as Chris@96: published by the Free Software Foundation; either version 2 of the Chris@96: License, or (at your option) any later version. See the file Chris@96: COPYING included with this distribution for more information. Chris@96: */ Chris@96: Chris@96: #include "NonRTThread.h" Chris@96: Chris@103: #ifndef _WIN32 Chris@96: #include Chris@103: #endif Chris@96: Chris@96: NonRTThread::NonRTThread(QObject *parent) : Chris@96: QThread(parent) Chris@96: { Chris@96: setStackSize(512 * 1024); Chris@96: } Chris@96: Chris@96: void Chris@96: NonRTThread::start() Chris@96: { Chris@96: QThread::start(); Chris@96: Chris@99: #ifndef _WIN32 Chris@96: struct sched_param param; Chris@96: ::memset(¶m, 0, sizeof(param)); Chris@96: Chris@96: if (::pthread_setschedparam(pthread_self(), SCHED_OTHER, ¶m)) { Chris@96: ::perror("pthread_setschedparam to SCHED_OTHER failed"); Chris@96: } Chris@96: #endif Chris@96: } Chris@96: