Changeset 9 in cheroxy


Ignore:
Timestamp:
10/23/12 13:39:36 (12 years ago)
Author:
cheese
Message:

#1 fix mutex code

Location:
branches/b0_1_threading/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/b0_1_threading/include/CRXMutex.h

    r7 r9  
    2222public:
    2323    int     Create      (void);
     24    int     Destroy     (void);
    2425    void    Lock        (void);
    2526    void    Unlock      (void);
  • branches/b0_1_threading/include/CRXThread.h

    r7 r9  
    66# include <windows.h>
    77# include <process.h>
    8 # define CRX_THREAD_TYPE            void
     8# define CRX_THREAD_TYPE    void
    99#else
    1010# include <pthread.h>
    11 # define CRX_THREAD_TYPE            void *
     11# define CRX_THREAD_TYPE    void *
    1212#endif
     13
     14typedef CRX_THREAD_TYPE (* CRX_THREAD_CALLBACK) (void *);
    1315
    1416class CRXThread
    1517{
    1618private:
    17     bool                mIsThreadRunnable;
     19    bool                        mIsRunnable;
    1820
    19     CRX_THREAD_TYPE     (* mCallback) (void * aArgs);
    20     void                * mThreadArg;
     21    CRX_THREAD_CALLBACK         mCallback;
     22    void                        * mThreadArg;
    2123
    2224public:
    23     CRXThread           (void);
     25    CRXThread                   (void);
     26    ~CRXThread                  (void);
    2427
    2528public:
    26     void    Create      (void);
     29    void            Create      (void);
    2730
    28     int     Run         (void);
    29     void    Stop        (void);
    30     void    SetRunnable (bool aIsRunnable);
    31     bool    IsRunnable  (void) const;
     31    virtual int     Run         (void);
     32    void            Stop        (void);
     33    inline void     SetRunnable (bool aIsRunnable);
     34    inline bool     IsRunnable  (void) const;
    3235};
    3336
Note: See TracChangeset for help on using the changeset viewer.