Sat, 09 Aug 2014 17:24:32 +0200
Added panel thread
/***************************************************************************** * Copyright (C) 2014 * * Michiel Broek <mbroek at mbse dot eu> * * This file is part of the mbsePi-apps * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2, or (at your option) any * later version. * * mbsePi-apps is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with ThermFerm; see the file COPYING. If not, write to the Free * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *****************************************************************************/ #include "thermferm.h" #include "panel.h" #ifdef HAVE_WIRINGPI_H extern int my_shutdown; extern int debug; PI_THREAD (my_panel_loop) { syslog(LOG_NOTICE, "Thread my_panel_loop started"); if (debug) fprintf(stdout, "Thread my_panel_loop started\n"); /* * Loop forever until the external shutdown variable is set. */ for (;;) { if (my_shutdown) break; /* * Loop 10 milliseconds */ usleep(10000); } syslog(LOG_NOTICE, "Thread my_panel_loop stopped"); if (debug) fprintf(stdout, "Thread my_panel_loop stopped\n"); return 0; } #endif