This documenta- tion describes the current state of development.
Note that interfaces and functionality may still change.

Prokee Modules:
  A
  B
  C
  D
  E
  F
  G
  I
  L
  M
  N
  O
  P
  R
  S
  T
  U
  W

     open all    |    close all

GUI Elements:
  B
  C
  I
  M
  P
  R
  S
  T

     open all    |    close all

GUI Interactions:
  B
  F
  H
  S

     open all    |    close all

GUI Layouts:
  L

     open all    |    close all

Games/Demos:
  M

     open all    |    close all

Third Party Libraries:
  P
  F
  Z

     open all    |    close all

Information about this Website / Informationen zu dieser Webseite:
In case of any questions, or comments, please feel free to contact me via email at apoll500@gmail.com.

Module threadman [Version: v01] (Interface AbsThreadMan)

   [AbsMsgItem]   [AbsThread]   [AbsThreadMan]

Contents

Inheritance:
AbsThreadMan
Implementations: ThreadMan

Constructors:
ThreadMan
AbsThreadMan *createThreadMan()

Methods:
getThreadById
AbsThread *getThreadById(unsigned int tid)
getThreadId
unsigned int getThreadId(AbsThread *tr)
countRunningThreads
unsigned int countRunningThreads()
printInfo
void printInfo()
createEmptyThread
AbsThread *createEmptyThread()
createThread
AbsThread *createThread(void(*main_func)(void *args),void *_args)
createThread2
AbsThread *createThread2(unsigned int tid,void(*main_func)(void *args),void *_args)
createLoopThread
AbsThread *createLoopThread(int32_t(*callback)(AbsThread *tread,AbsMsgItem *msgItem))
createLoopThread2
AbsThread *createLoopThread2(unsigned int tid,int32_t(*callback)(AbsThread *tread,AbsMsgItem *msgItem))
createThreadEx
AbsThread *createThreadEx(int32_t(*callback)(AbsThread *tread,AbsMsgItem *msgItem),void(*main_func)(void *args),void *_args)
setMasterThread
void setMasterThread(AbsThread *tr)
getMasterThread
AbsThread *getMasterThread()
sendMessage
int sendMessage(AbsThread *tr,uint64_t msgID,uint64_t msgParam,uint64_t msgFlags,void *msgData)
broadcastMessage
int broadcastMessage(AbsThread *senderThread,uint64_t msgID,uint64_t msgParam,uint64_t msgFlags,void *msgData)
broadcastShutdownMessage
int broadcastShutdownMessage()

Constructors

   ThreadMan


Thread Manager

Constructor:
ThreadMan()

Factory Method:
AbsThreadMan *AbsThreadManInterface::createThreadMan()

Wrapper Class:
ThreadManWrapper()

The static method AbsThreadManInterface::createThreadMan creates a new instance of class ThreadMan.

Return value:
Returns an instance of ThreadMan.


Methods

   getThreadById


Returns the Thread of a thread ID.

Signature:
AbsThread *getThreadById(unsigned int tid)

Parameters:
Type Name Direction Description
unsigned int tidA unique ID of the thread.


Return value:
The Thread of the thread ID.

   getThreadId


Returns the ID of a thread.

Signature:
unsigned int getThreadId(AbsThread *tr)

Parameters:
Type Name Direction Description
AbsThread *tr[IN]Pointer to a AbsThread object.


Return value:
The ID of the thread.

   countRunningThreads


Returns the number of running threads.

Signature:
unsigned int countRunningThreads()

Return value:
The number of running threads.

   printInfo


Printing debug info.

Signature:
void printInfo()

   createEmptyThread


Creates a new empty Thread.

Signature:
AbsThread *createEmptyThread()

Return value:
Pointer to an instance of Thread.

   createThread


Creates a new thread.

Signature:
AbsThread *createThread(void(*main_func)(void *args),void *_args)

Parameters:
Type Name Direction Description
void(*main_func)
(
   void *args
)
with typedef
TypeName
ThreadMainFunctionmain_func
[IN] The thread-main function.
Parameter
args: Pointer to the function arguments.
void *_argsPointer to arguments for the call of main_func.


Return value:
Pointer to an instance of Thread.

   createThread2


Creates a new thread.

Signature:
AbsThread *createThread2(unsigned int tid,void(*main_func)(void *args),void *_args)

Parameters:
Type Name Direction Description
unsigned int tidA unique ID of the thread.
void(*main_func)
(
   void *args
)
with typedef
TypeName
ThreadMainFunctionmain_func
[IN] The thread-main function.
Parameter
args: Pointer to the function arguments.
void *_argsPointer to arguments for the call of main_func.


Return value:
Pointer to an instance of Thread.

   createLoopThread


Creates a new thread.

Signature:
AbsThread *createLoopThread(int32_t(*callback)(AbsThread *tread,AbsMsgItem *msgItem))

Parameters:
Type Name Direction Description
int32_t(*callback)
(
   AbsThread *tread
,
   AbsMsgItem *msgItem
)
with typedef
TypeName
ThreadCallbackFunctioncallback
[IN] The thread-callback function.
Parameter
tread: Pointer to the thread wrapper class the message was sent to.
msgItem: Pointer to a message item.
Return value
Return value of the callback function.


Return value:
Pointer to an instance of Thread.

   createLoopThread2


Creates a new thread.

Signature:
AbsThread *createLoopThread2(unsigned int tid,int32_t(*callback)(AbsThread *tread,AbsMsgItem *msgItem))

Parameters:
Type Name Direction Description
unsigned int tidA unique ID of the thread.
int32_t(*callback)
(
   AbsThread *tread
,
   AbsMsgItem *msgItem
)
with typedef
TypeName
ThreadCallbackFunctioncallback
[IN] The thread-callback function.
Parameter
tread: Pointer to the thread wrapper class the message was sent to.
msgItem: Pointer to a message item.
Return value
Return value of the callback function.


Return value:
Pointer to an instance of Thread.

   createThreadEx


Creates a new thread.

Signature:
AbsThread *createThreadEx(int32_t(*callback)(AbsThread *tread,AbsMsgItem *msgItem),void(*main_func)(void *args),void *_args)

Parameters:
Type Name Direction Description
int32_t(*callback)
(
   AbsThread *tread
,
   AbsMsgItem *msgItem
)
with typedef
TypeName
ThreadCallbackFunctioncallback
[IN] The thread-callback function.
Parameter
tread: Pointer to the thread wrapper class the message was sent to.
msgItem: Pointer to a message item.
Return value
Return value of the callback function.
void(*main_func)
(
   void *args
)
with typedef
TypeName
ThreadMainFunctionmain_func
[IN] The thread-main function.
Parameter
args: Pointer to the function arguments.
void *_argsPointer to arguments for the call of main_func.


Return value:
Pointer to an instance of Thread.

   setMasterThread


Sets the master thread.

Signature:
void setMasterThread(AbsThread *tr)

Parameters:
Type Name Direction Description
AbsThread *tr[IN]Pointer to a AbsThread object.


   getMasterThread


Returns a pointer to the master thread.

Signature:
AbsThread *getMasterThread()

Return value:
Pointer to the master thread.

   sendMessage


Sends a message to a thread.

Signature:
int sendMessage(AbsThread *tr,uint64_t msgID,uint64_t msgParam,uint64_t msgFlags,void *msgData)

Parameters:
Type Name Direction Description
AbsThread *tr[IN]Pointer to a AbsThread object.
uint64_t msgIDThe ID of the type of message.
uint64_t msgParamThe Parameter of message.
uint64_t msgFlagsThe Flags of message.
void *msgDataThe data sent with the message.


Return value:
...

   broadcastMessage


Sends a message to a thread.

Signature:
int broadcastMessage(AbsThread *senderThread,uint64_t msgID,uint64_t msgParam,uint64_t msgFlags,void *msgData)

Parameters:
Type Name Direction Description
AbsThread *senderThread[IN]Pointer to a AbsThread object.
uint64_t msgIDThe ID of the type of message.
uint64_t msgParamThe Parameter of message.
uint64_t msgFlagsThe Flags of message.
void *msgDataThe data sent with the message.


Return value:
Number of receiving threads.

   broadcastShutdownMessage


Sends a message to a thread.

Signature:
int broadcastShutdownMessage()

Return value:
Number of receiving threads.


Copyright © 2017 - 2019 by Andreas Pollhammer