Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 7, 2007, 9:28:52 PM (17 years ago)
Author:
bensch
Message:

threads better compiled now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/cleanup/src/lib/util/threads/thread.h

    r10575 r10576  
    22#define __THREAD_H__
    33
    4 #ifdef HAVE_SDL_H
    5 #include <SDL_thread.h>
    6 #else
    7 #include <SDL/SDL_thread.h>
    8 #endif
     4#include "threadincl.h"
    95
    106namespace OrxThread
     
    139  class Thread
    1410  {
    15     public:
    16       Thread(int (*fn)(void *), void *data) { this->thread = SDL_CreateThread(fn, data); };
    17       virtual ~Thread() { SDL_KillThread(this->thread); }
    18       void exit ( int returnCode = 0 );
    19       bool isFinished () const;
    20       bool isRunning () const;
    21       void wait() { SDL_WaitThread(this->thread, NULL); };
     11  public:
     12    Thread(int (*fn)(void *), void *data) { this->thread = SDL_CreateThread(fn, data); };
     13    virtual ~Thread() { SDL_KillThread(this->thread); }
     14    void exit ( int returnCode = 0 );
     15    bool isFinished () const;
     16    bool isRunning () const;
     17    void wait() { SDL_WaitThread(this->thread, NULL); };
    2218
    23       void start();
    24       void terminate();
     19    void start();
     20    void terminate();
    2521
    2622
    27     private:
    28       SDL_Thread* thread;
     23  private:
     24    SDL_Thread* thread;
    2925
    3026  };
     27}
    3128
    3229#endif /* __THREAD_H__ */
Note: See TracChangeset for help on using the changeset viewer.