apt_task.h File Reference
Thread Execution Abstraction.
More...
#include "apt.h"
#include "apt_task_msg.h"
Go to the source code of this file.
Detailed Description
Thread Execution Abstraction.
Typedef Documentation
Opaque task event declaration
Opaque task method declaration
Opaque task virtual table declaration
Function Documentation
Add child task.
- Parameters:
-
| task | the task to add child task to |
| child_task | the child task to add |
Enable/disable auto ready mode.
- Parameters:
-
| task | the task to set mode for |
| auto_ready | the enabled/disabled auto ready mode |
Start child tasks.
- Parameters:
-
Terminate child tasks.
- Parameters:
-
Create task.
- Parameters:
-
| obj | the external object to associate with the task |
| msg_pool | the pool of task messages |
| pool | the pool to allocate memory from |
void apt_task_delay |
( |
apr_size_t |
msec |
) |
|
Hold task execution.
- Parameters:
-
Destroy task.
- Parameters:
-
Get (acquire) task message.
- Parameters:
-
| task | the task to get task message from |
Signal (post) message to the parent of the specified task.
- Parameters:
-
| task | the task to signal message to |
| msg | the message to signal |
Process message signaled to the task.
- Parameters:
-
| task | the task to process message |
| msg | the message to process |
Signal (post) message to the task.
- Parameters:
-
| task | the task to signal message to |
| msg | the message to signal |
const char* apt_task_name_get |
( |
const apt_task_t * |
task |
) |
|
Get task name.
- Parameters:
-
| task | the task to get name from |
void apt_task_name_set |
( |
apt_task_t * |
task, |
|
|
const char * |
name | |
|
) |
| | |
Give a name to the task.
- Parameters:
-
| task | the task to give name for |
| name | the name to set |
void* apt_task_object_get |
( |
const apt_task_t * |
task |
) |
|
Get external object associated with the task.
- Parameters:
-
| task | the task to get object from |
Get parent (master) task.
- Parameters:
-
| task | the task to get parent from |
apr_pool_t* apt_task_pool_get |
( |
const apt_task_t * |
task |
) |
|
Get memory pool associated with task.
- Parameters:
-
| task | the task to get pool from |
Explicitly indicate task is ready to process messages.
- Parameters:
-
Get the running flag.
- Parameters:
-
Add start request.
- Parameters:
-
Remove start request.
- Parameters:
-
Terminate task.
- Parameters:
-
| task | the task to terminate |
| wait_till_complete | whether to wait for task to complete or process termination asynchronously |
Add termination request.
- Parameters:
-
Remove termination request.
- Parameters:
-
Get task vtable.
- Parameters:
-
| task | the task to get vtable from |
Wait for task till complete.
- Parameters:
-
| task | the task to wait for |