- minor code cleanup

svn path=/trunk/boinc/; revision=18805
This commit is contained in:
David Anderson 2009-08-03 21:46:16 +00:00
parent f163897d8a
commit b4d29b9c6d
2 changed files with 15 additions and 17 deletions

View File

@ -45,7 +45,7 @@ static DWORD g_WindowsMonitorSystemThreadID = NULL;
//
// Quit operations
void quit_client() {
static void quit_client() {
gstate.requested_exit = true;
while (1) {
boinc_sleep(1.0);
@ -54,7 +54,7 @@ void quit_client() {
}
// Suspend client operations
void suspend_client(bool wait) {
static void suspend_client(bool wait) {
gstate.requested_suspend = true;
if (wait) {
while (1) {
@ -65,12 +65,12 @@ void suspend_client(bool wait) {
}
// Resume client operations
void resume_client() {
static void resume_client() {
gstate.requested_resume = true;
}
// Process console messages sent by the system
BOOL WINAPI ConsoleControlHandler( DWORD dwCtrlType ){
static BOOL WINAPI ConsoleControlHandler( DWORD dwCtrlType ){
BOOL bReturnStatus = FALSE;
BOINCTRACE("***** Console Event Detected *****\n");
switch( dwCtrlType ){
@ -97,7 +97,7 @@ BOOL WINAPI ConsoleControlHandler( DWORD dwCtrlType ){
}
// Trap events on Windows so we can clean ourselves up.
LRESULT CALLBACK WindowsMonitorSystemWndProc(
static LRESULT CALLBACK WindowsMonitorSystemWndProc(
HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
) {
switch(uMsg) {
@ -154,7 +154,7 @@ LRESULT CALLBACK WindowsMonitorSystemWndProc(
}
// Create a thread to monitor system events
DWORD WINAPI WindowsMonitorSystemThread( LPVOID ) {
static DWORD WINAPI WindowsMonitorSystemThread( LPVOID ) {
HWND hwndMain;
WNDCLASS wc;
MSG msg;

View File

@ -24,11 +24,9 @@
extern "C" {
#endif
int initialize_system_monitor(int argc, char** argv);
int initialize_service_dispatcher(int argc, char** argv);
int cleanup_system_monitor();
extern int initialize_system_monitor(int argc, char** argv);
extern int initialize_service_dispatcher(int argc, char** argv);
extern int cleanup_system_monitor();
// Internal name of the service
#define SZSERVICENAME "BOINC"
@ -46,12 +44,12 @@ int cleanup_system_monitor();
SERVICE_ACCEPT_SHUTDOWN )
// Service Control Manager Routines
VOID WINAPI BOINCServiceMain(DWORD dwArgc, LPTSTR *lpszArgv);
VOID WINAPI BOINCServiceCtrl(DWORD dwCtrlCode);
BOOL ReportStatus(DWORD dwCurrentState, DWORD dwWin32ExitCode, DWORD dwWaitHint);
VOID LogEventErrorMessage(LPTSTR lpszMsg);
VOID LogEventWarningMessage(LPTSTR lpszMsg);
VOID LogEventInfoMessage(LPTSTR lpszMsg);
extern VOID WINAPI BOINCServiceMain(DWORD dwArgc, LPTSTR *lpszArgv);
extern VOID WINAPI BOINCServiceCtrl(DWORD dwCtrlCode);
extern BOOL ReportStatus(DWORD dwCurrentState, DWORD dwWin32ExitCode, DWORD dwWaitHint);
extern VOID LogEventErrorMessage(LPTSTR lpszMsg);
extern VOID LogEventWarningMessage(LPTSTR lpszMsg);
extern VOID LogEventInfoMessage(LPTSTR lpszMsg);
#ifdef __cplusplus
}