4326223276
At this point there is still work to do on them.
108 lines
2.8 KiB
C++
108 lines
2.8 KiB
C++
/***********************************************************************
|
|
*
|
|
* Copyright (C) 2006 Novell, Inc. All Rights Reserved.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; version 2.1
|
|
* of the License.
|
|
*
|
|
* This library 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
|
|
* Library Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, Novell, Inc.
|
|
*
|
|
* To contact Novell about this file by physical or electronic mail,
|
|
* you may find current contact information at www.novell.com.
|
|
*
|
|
* Author: Juan Carlos Luciani <jluciani@novell.com>
|
|
*
|
|
***********************************************************************/
|
|
|
|
|
|
#ifndef _SERVERTHREAD_
|
|
#define _SERVERTHREAD_
|
|
|
|
//===[ Include files ]=====================================================
|
|
|
|
//===[ External data ]=====================================================
|
|
|
|
//===[ External prototypes ]===============================================
|
|
|
|
//===[ Manifest constants ]================================================
|
|
|
|
//===[ Type definitions ]==================================================
|
|
|
|
//===[ Function prototypes ]===============================================
|
|
|
|
//===[ Global variables ]==================================================
|
|
|
|
//===[ Type definitions ]==================================================
|
|
|
|
//
|
|
// Server Thread Class
|
|
//
|
|
class ServerThread
|
|
{
|
|
// Signature
|
|
unsigned long m_signature;
|
|
|
|
// Synchronization variable
|
|
pthread_cond_t m_condition;
|
|
|
|
public:
|
|
|
|
//
|
|
// Destructor
|
|
~ServerThread(void);
|
|
|
|
//
|
|
// Constructor
|
|
//
|
|
// Parameters: None.
|
|
//
|
|
// Abstract: Constructs ServerThread object.
|
|
//
|
|
// Returns: Nothing.
|
|
//
|
|
ServerThread(void);
|
|
|
|
//
|
|
// Awaken ServerThread routine
|
|
//
|
|
// Parameters: None.
|
|
//
|
|
// Abstract: Awakens a ServerThread.
|
|
//
|
|
// Returns: Nothing.
|
|
//
|
|
void awaken(void);
|
|
|
|
//
|
|
// Suspend ServerThread routine
|
|
//
|
|
// Parameters:
|
|
// pMutex (input) -
|
|
// Pointer to mutex to associate with
|
|
// condition used for waiting..
|
|
//
|
|
// Abstract: Suspends a ServerThread.
|
|
//
|
|
// Returns: Nothing.
|
|
//
|
|
void suspend(pthread_mutex_t *pMutex);
|
|
};
|
|
|
|
|
|
//===[ Function prototypes ]===============================================
|
|
|
|
|
|
#endif // _SERVERTHREAD_
|
|
|
|
//=========================================================================
|
|
//=========================================================================
|
|
|