include/SDL_thread.h
branchSDL-1.2
changeset 4217 4c4113c2162c
parent 4159 a1b03ba2fcd0
child 5892 eca95aaa02a2
     1.1 --- a/include/SDL_thread.h	Mon Sep 21 09:27:08 2009 +0000
     1.2 +++ b/include/SDL_thread.h	Mon Sep 21 09:38:10 2009 +0000
     1.3 @@ -23,10 +23,11 @@
     1.4  #ifndef _SDL_thread_h
     1.5  #define _SDL_thread_h
     1.6  
     1.7 -/* Header for the SDL thread management routines 
     1.8 -
     1.9 -	These are independent of the other SDL routines.
    1.10 -*/
    1.11 +/** @file SDL_thread.h
    1.12 + *  Header for the SDL thread management routines 
    1.13 + *
    1.14 + *  @note These are independent of the other SDL routines.
    1.15 + */
    1.16  
    1.17  #include "SDL_stdinc.h"
    1.18  #include "SDL_error.h"
    1.19 @@ -40,25 +41,25 @@
    1.20  extern "C" {
    1.21  #endif
    1.22  
    1.23 -/* The SDL thread structure, defined in SDL_thread.c */
    1.24 +/** The SDL thread structure, defined in SDL_thread.c */
    1.25  struct SDL_Thread;
    1.26  typedef struct SDL_Thread SDL_Thread;
    1.27  
    1.28 -/* Create a thread */
    1.29 +/** Create a thread */
    1.30  #if ((defined(__WIN32__) && !defined(HAVE_LIBC)) || defined(__OS2__)) &&  !defined(__SYMBIAN32__)
    1.31 -/*
    1.32 -   We compile SDL into a DLL on OS/2. This means, that it's the DLL which
    1.33 -   creates a new thread for the calling process with the SDL_CreateThread()
    1.34 -   API. There is a problem with this, that only the RTL of the SDL.DLL will
    1.35 -   be initialized for those threads, and not the RTL of the calling application!
    1.36 -   To solve this, we make a little hack here.
    1.37 -   We'll always use the caller's _beginthread() and _endthread() APIs to
    1.38 -   start a new thread. This way, if it's the SDL.DLL which uses this API,
    1.39 -   then the RTL of SDL.DLL will be used to create the new thread, and if it's
    1.40 -   the application, then the RTL of the application will be used.
    1.41 -   So, in short:
    1.42 -   Always use the _beginthread() and _endthread() of the calling runtime library!
    1.43 -*/
    1.44 +/**
    1.45 + *  We compile SDL into a DLL on OS/2. This means, that it's the DLL which
    1.46 + *  creates a new thread for the calling process with the SDL_CreateThread()
    1.47 + *  API. There is a problem with this, that only the RTL of the SDL.DLL will
    1.48 + *  be initialized for those threads, and not the RTL of the calling application!
    1.49 + *  To solve this, we make a little hack here.
    1.50 + *  We'll always use the caller's _beginthread() and _endthread() APIs to
    1.51 + *  start a new thread. This way, if it's the SDL.DLL which uses this API,
    1.52 + *  then the RTL of SDL.DLL will be used to create the new thread, and if it's
    1.53 + *  the application, then the RTL of the application will be used.
    1.54 + *  So, in short:
    1.55 + *  Always use the _beginthread() and _endthread() of the calling runtime library!
    1.56 + */
    1.57  #define SDL_PASSED_BEGINTHREAD_ENDTHREAD
    1.58  #ifndef _WIN32_WCE
    1.59  #include <process.h> /* This has _beginthread() and _endthread() defined! */
    1.60 @@ -92,21 +93,21 @@
    1.61  extern DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (SDLCALL *fn)(void *), void *data);
    1.62  #endif
    1.63  
    1.64 -/* Get the 32-bit thread identifier for the current thread */
    1.65 +/** Get the 32-bit thread identifier for the current thread */
    1.66  extern DECLSPEC Uint32 SDLCALL SDL_ThreadID(void);
    1.67  
    1.68 -/* Get the 32-bit thread identifier for the specified thread,
    1.69 -   equivalent to SDL_ThreadID() if the specified thread is NULL.
    1.70 +/** Get the 32-bit thread identifier for the specified thread,
    1.71 + *  equivalent to SDL_ThreadID() if the specified thread is NULL.
    1.72   */
    1.73  extern DECLSPEC Uint32 SDLCALL SDL_GetThreadID(SDL_Thread *thread);
    1.74  
    1.75 -/* Wait for a thread to finish.
    1.76 -   The return code for the thread function is placed in the area
    1.77 -   pointed to by 'status', if 'status' is not NULL.
    1.78 +/** Wait for a thread to finish.
    1.79 + *  The return code for the thread function is placed in the area
    1.80 + *  pointed to by 'status', if 'status' is not NULL.
    1.81   */
    1.82  extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread *thread, int *status);
    1.83  
    1.84 -/* Forcefully kill a thread without worrying about its state */
    1.85 +/** Forcefully kill a thread without worrying about its state */
    1.86  extern DECLSPEC void SDLCALL SDL_KillThread(SDL_Thread *thread);
    1.87  
    1.88