#ifndef __STK_THREAD
#define __STK_THREAD

#include <stdio.h>
#include <stdlib.h>

#include <SDL_thread.h>
#include <SDL_mutex.h>


/** The Mutext class. It will be used to control variables shared with
    multiple threads.
*/
class Stk_Mutex
{
public:
        /// Constructor
    Stk_Mutex();
        /// Destructor
    ~Stk_Mutex();
        /// P: lock the variable
    void P();
        /// V: unlock
    void V();
    
private:
    SDL_mutex *m;
};



/*  The Thread class...
*/

int thread_function(void *current);

class Stk_Thread
{
public:

        /// Constructor
    Stk_Thread();
    
        /// Launch the thread
    virtual void Start();
    
        /// The Thread function
    virtual int function();
    
private:
    SDL_Thread *thread;
};



#endif;
