src/tools/tToDo.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void tTODO_FUNC ()

Functions

void st_ToDo_Signal (tTODO_FUNC *td)
void st_ToDo (tTODO_FUNC *td)
void st_DoToDo ()


Typedef Documentation

typedef void tTODO_FUNC()

Definition at line 33 of file tToDo.h.


Function Documentation

void st_DoToDo (  ) 

Definition at line 57 of file tToDo.cpp.

References tMockMutex::acquire(), GrowingArrayBase::Len(), tMockMutex::release(), tArray< T, MALLOC >::SetLen(), st_ToDo(), and st_toDoFromSignal.

Referenced by ConnectToServerCore(), nServerInfo::GetFromMaster(), nAuthentication::OnBreak(), uMenu::OnEnter(), sg_HostGame(), and update_settings().

00057                 { // do the things that have been postponed
00058     if ( st_toDoFromSignal )
00059     {
00060         st_ToDo( st_toDoFromSignal );
00061         st_toDoFromSignal = 0;
00062     }
00063     st_mutex.acquire();
00064     while (tToDos.Len()){
00065         tTODO_FUNC *td=tToDos[tToDos.Len()-1];
00066         tToDos.SetLen(tToDos.Len()-1);
00067         (*td)();
00068     }
00069     st_mutex.release();
00070 }

Here is the call graph for this function:

Here is the caller graph for this function:

void st_ToDo ( tTODO_FUNC td  ) 

Definition at line 48 of file tToDo.cpp.

References tMockMutex::acquire(), GrowingArrayBase::Len(), and tMockMutex::release().

Referenced by gBrowserMenuItem::Event(), gGame::GameLoop(), nAuthentication::HandlePasswordRequest(), next_free_server(), sg_ConsoleInput(), st_DoToDo(), and gGame::StateUpdate().

00048                             { // postpone something
00049     st_mutex.acquire();
00050     tToDos[tToDos.Len()]=td;
00051     st_mutex.release();
00052 }

Here is the call graph for this function:

Here is the caller graph for this function:

void st_ToDo_Signal ( tTODO_FUNC td  ) 

Definition at line 72 of file tToDo.cpp.

References st_toDoFromSignal.

Referenced by st_HandleSigHup().

00072                                    { // postpone something
00073     // simply ignore double todos from signals.
00074     if ( st_toDoFromSignal )
00075     {
00076         return;
00077     }
00078     st_toDoFromSignal = td;
00079 }

Here is the caller graph for this function:


Generated on Sat Mar 15 23:13:21 2008 for Armagetron Advanced by  doxygen 1.5.4