// @(#)root/thread:$Id$
// Author: Fons Rademakers   02/07/97

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TPosixThread
#define ROOT_TPosixThread


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TPosixThread                                                         //
//                                                                      //
// This class provides an interface to the posix thread routines.       //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TThreadImp
#include "TThreadImp.h"
#endif

#ifndef __CINT__
#include <pthread.h>
#endif

R__EXTERN "C" unsigned int sleep(unsigned int seconds);

class TPosixThreadCleanUp;


class TPosixThread : public TThreadImp {

public:
   TPosixThread() { }
   ~TPosixThread() { }

   virtual Int_t  Join(TThread *th, void **ret);
   virtual Long_t SelfId();
   virtual Int_t  Run(TThread *th);

   virtual Int_t  Kill(TThread *th);
   virtual Int_t  SetCancelOff();
   virtual Int_t  SetCancelOn();
   virtual Int_t  SetCancelAsynchronous();
   virtual Int_t  SetCancelDeferred();
   virtual Int_t  CancelPoint();
   virtual Int_t  CleanUpPush(void **main, void *free,void *arg);
   virtual Int_t  CleanUpPop(void **main, Int_t exe);
   virtual Int_t  CleanUp(void **main);

   virtual Int_t  Exit(void *ret);

   ClassDef(TPosixThread,0)  // TPosixThread class
};


class TPosixThreadCleanUp {

friend class TPosixThread;

private:
   void                *fRoutine;
   void                *fArgument;
   TPosixThreadCleanUp *fNext;

public:
   TPosixThreadCleanUp(void **main, void *routine, void *arg);
   ~TPosixThreadCleanUp() { }
};

#endif
 TPosixThread.h:1
 TPosixThread.h:2
 TPosixThread.h:3
 TPosixThread.h:4
 TPosixThread.h:5
 TPosixThread.h:6
 TPosixThread.h:7
 TPosixThread.h:8
 TPosixThread.h:9
 TPosixThread.h:10
 TPosixThread.h:11
 TPosixThread.h:12
 TPosixThread.h:13
 TPosixThread.h:14
 TPosixThread.h:15
 TPosixThread.h:16
 TPosixThread.h:17
 TPosixThread.h:18
 TPosixThread.h:19
 TPosixThread.h:20
 TPosixThread.h:21
 TPosixThread.h:22
 TPosixThread.h:23
 TPosixThread.h:24
 TPosixThread.h:25
 TPosixThread.h:26
 TPosixThread.h:27
 TPosixThread.h:28
 TPosixThread.h:29
 TPosixThread.h:30
 TPosixThread.h:31
 TPosixThread.h:32
 TPosixThread.h:33
 TPosixThread.h:34
 TPosixThread.h:35
 TPosixThread.h:36
 TPosixThread.h:37
 TPosixThread.h:38
 TPosixThread.h:39
 TPosixThread.h:40
 TPosixThread.h:41
 TPosixThread.h:42
 TPosixThread.h:43
 TPosixThread.h:44
 TPosixThread.h:45
 TPosixThread.h:46
 TPosixThread.h:47
 TPosixThread.h:48
 TPosixThread.h:49
 TPosixThread.h:50
 TPosixThread.h:51
 TPosixThread.h:52
 TPosixThread.h:53
 TPosixThread.h:54
 TPosixThread.h:55
 TPosixThread.h:56
 TPosixThread.h:57
 TPosixThread.h:58
 TPosixThread.h:59
 TPosixThread.h:60
 TPosixThread.h:61
 TPosixThread.h:62
 TPosixThread.h:63
 TPosixThread.h:64
 TPosixThread.h:65
 TPosixThread.h:66
 TPosixThread.h:67
 TPosixThread.h:68
 TPosixThread.h:69
 TPosixThread.h:70
 TPosixThread.h:71
 TPosixThread.h:72
 TPosixThread.h:73
 TPosixThread.h:74
 TPosixThread.h:75
 TPosixThread.h:76
 TPosixThread.h:77