1 /* 2 * pprocess.h 3 * 4 * Operating system process (running program) class. 5 * 6 * Portable Windows Library 7 * 8 * Copyright (c) 1993-1998 Equivalence Pty. Ltd. 9 * 10 * The contents of this file are subject to the Mozilla Public License 11 * Version 1.0 (the "License"); you may not use this file except in 12 * compliance with the License. You may obtain a copy of the License at 13 * http://www.mozilla.org/MPL/ 14 * 15 * Software distributed under the License is distributed on an "AS IS" 16 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 17 * the License for the specific language governing rights and limitations 18 * under the License. 19 * 20 * The Original Code is Portable Windows Library. 21 * 22 * The Initial Developer of the Original Code is Equivalence Pty. Ltd. 23 * 24 * Portions are Copyright (C) 1993 Free Software Foundation, Inc. 25 * All Rights Reserved. 26 * 27 * Contributor(s): ______________________________________. 28 * 29 * $Revision: 26758 $ 30 * $Author: rjongbloed $ 31 * $Date: 2011-12-06 18:52:22 -0600 (Tue, 06 Dec 2011) $ 32 */ 33 34 35 /////////////////////////////////////////////////////////////////////////////// 36 // PProcess 37 38 public: 39 ~PProcess(); 40 41 bool SignalTimerChange(); 42 // Signal to the timer thread that a change was made. 43 44 virtual PBoolean IsServiceProcess() const; 45 virtual PBoolean IsGUIProcess() const; 46 void WaitOnExitConsoleWindow(); 47 48 private: 49 PLIST(ThreadList, PThread); 50 ThreadList autoDeleteThreads; 51 PMutex deleteThreadMutex; 52 53 class HouseKeepingThread : public PThread 54 { 55 PCLASSINFO(HouseKeepingThread, PThread) 56 public: 57 HouseKeepingThread(); 58 ~HouseKeepingThread(); 59 void Main(); 60 PSyncPoint m_breakBlock; 61 bool m_running; 62 }; 63 HouseKeepingThread * houseKeeper; 64 // Thread for doing timers, thread clean up etc. 65 66 friend PThread * PThread::Current(); 67 friend void HouseKeepingThread::Main(); 68 friend UINT __stdcall PThread::MainFunction(void * thread); 69 friend class PServiceProcess; 70 friend class PApplication; 71 72 friend PDEFINE_WINMAIN(hInstance, hPrevInstance, lpCmdLine, nCmdShow); 73 74 // End Of File /////////////////////////////////////////////////////////////// 75