Ignore:
Timestamp:
12/16/2006 06:26:42 PM (13 years ago)
Author:
art
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • nrEngine/include/IThread.h

    r1 r11  
    2020#include "Prerequisities.h" 
    2121 
    22 #include <boost/thread/thread.hpp> 
    23 #include <boost/thread/mutex.hpp> 
    24  
     22#include <pthread.h> 
     23                 
    2524namespace nrEngine{ 
    2625 
     
    5049         * that kernel want to stop the thread. Suspending the task will cause the kernel 
    5150         * to let the according thread sleeping until the task is resumed. There is 
    52          * no other way how you can let the task to sleep. 
     51         * no other way how you can let the task sleep. 
    5352         * 
    5453         * So how the thread interface cooperate with the kernel and the task interface. 
     
    6463         * between starting a task as a task or as a thread. 
    6564         * 
    66          * In each cycly the kernel does call taskUpdate() method for sequential tasks. For 
     65         * In each cycle the kernel does call taskUpdate() method for sequential tasks. For 
    6766         * parallel tasks (threads) it does not call anything, because thread interface already 
    6867         * running and it will automaticaly call the appropritate taskUpdate() method, so 
     
    123122                private: 
    124123 
    125                         //! Store here the thread instance 
    126                         boost::thread*  mThread; 
    127  
    128124                        /** 
    129125                         * This is a entry point for a thread. The method is 
    130126                         * static because it do not have to access any data 
    131                          * of the objec titself. The given thread instance as a parameter 
     127                         * of the object itself. The given thread instance as a parameter 
    132128                         * will be updated and managed as a thread. 
    133129                         **/ 
    134                         static void run(IThread* mythread); 
     130                        static void* run(void* mythread); 
     131                        //static void run(IThread* mythread); 
    135132 
    136133                        //! Kernel is a friend class 
     
    180177                        volatile ThreadState    mThreadState; 
    181178 
    182                         //! Mutex to lock the data before use 
    183                         boost::mutex mMutex; 
     179                        // Mutex to lock the data before use 
     180                        //pthread_mutex_t mMutex; 
    184181 
     182                        //! Store here the thread instance 
     183                        pthread_t       mThread; 
     184 
     185                        //! Thread attributes 
     186                        pthread_attr_t mThreadJoinableAttr; 
     187                         
    185188                        //! Change a thread to new state, use mutex to lock the state 
    186189                        void changeState(ThreadState newState); 
Note: See TracChangeset for help on using the changeset viewer.