ns-3 Direct Code Execution
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ns3::Task Class Reference

#include <task-manager.h>

+ Collaboration diagram for ns3::Task:

Public Types

enum  SwitchType { TO, FROM }

Public Member Functions

void * GetContext (void) const
void * GetExtraContext (void) const
bool IsActive (void) const
bool IsBlocked (void) const
bool IsDead (void) const
bool IsRunning (void) const
void SetContext (void *ctx)
void SetExtraContext (void *ctx)
void SetSwitchNotifier (void(*fn)(enum SwitchType, void *), void *context)

Private Types

enum  State { RUNNING, ACTIVE, BLOCKED, DEAD }

Private Member Functions

 ~Task ()

Private Attributes

void * m_context
void * m_extraContext
Fiberm_fiber
enum State m_state
void(* m_switchNotifier )(enum SwitchType, void *)
void * m_switchNotifierContext
EventId m_waitTimer

Friends

class TaskManager

Detailed Description

Definition at line 18 of file task-manager.h.

Member Enumeration Documentation

enum ns3::Task::State
private
Enumerator:
RUNNING 
ACTIVE 
BLOCKED 
DEAD 

Definition at line 41 of file task-manager.h.

Enumerator:
TO 
FROM 

Definition at line 21 of file task-manager.h.

Constructor & Destructor Documentation

ns3::Task::~Task ( )
private

Definition at line 74 of file task-manager.cc.

Member Function Documentation

void * ns3::Task::GetContext ( void  ) const

Definition at line 62 of file task-manager.cc.

References m_context.

Referenced by ns3::Current(), and ns3::LinuxSocketFdFactory::TaskCurrent().

+ Here is the caller graph for this function:

void * ns3::Task::GetExtraContext ( void  ) const
bool ns3::Task::IsActive ( void  ) const

Definition at line 27 of file task-manager.cc.

References ACTIVE, and m_state.

Referenced by ns3::Waiter::Wakeup(), and ns3::WaitPoint::WakeUpCallback().

+ Here is the caller graph for this function:

bool ns3::Task::IsBlocked ( void  ) const

Definition at line 37 of file task-manager.cc.

References BLOCKED, and m_state.

Referenced by dce_pthread_kill(), ns3::LinuxSocketFdFactory::TaskWakeup(), ns3::UtilsSendSignal(), ns3::Waiter::Wakeup(), and ns3::WaitPoint::WakeUpCallback().

+ Here is the caller graph for this function:

bool ns3::Task::IsDead ( void  ) const

Definition at line 42 of file task-manager.cc.

References DEAD, and m_state.

bool ns3::Task::IsRunning ( void  ) const

Definition at line 32 of file task-manager.cc.

References m_state, and RUNNING.

void ns3::Task::SetContext ( void *  ctx)
void ns3::Task::SetSwitchNotifier ( void(*)(enum SwitchType, void *)  fn,
void *  context 
)

Friends And Related Function Documentation

friend class TaskManager
friend

Definition at line 39 of file task-manager.h.

Member Data Documentation

void* ns3::Task::m_context
private
void* ns3::Task::m_extraContext
private
void(* ns3::Task::m_switchNotifier)(enum SwitchType, void *)
private
void* ns3::Task::m_switchNotifierContext
private

The documentation for this class was generated from the following files: