|
Kohi Game Engine
|
Describes a job to be run. More...
#include <job_system.h>
Data Fields | |
| job_type | type |
| The type of job. Used to determine which thread the job executes on. More... | |
| u16 | id |
| The uniquie identifier of this job. More... | |
| job_priority | priority |
| The priority of this job. Higher priority jobs obviously run sooner. More... | |
| pfn_job_start | entry_point |
| A function pointer to be invoked when the job starts. Required. More... | |
| pfn_job_on_complete | on_success |
| A function pointer to be invoked when the job successfully completes. Optional. More... | |
| pfn_job_on_complete | on_fail |
| A function pointer to be invoked when the job successfully fails. Optional. More... | |
| void * | param_data |
| Data to be passed to the entry point upon execution. More... | |
| u32 | param_data_size |
| The size of the data passed to the job. More... | |
| void * | result_data |
| Data to be passed to the success/fail function upon execution, if exists. More... | |
| u32 | result_data_size |
| The size of the data passed to the success/fail function. More... | |
| u8 | dependency_count |
| A count of job identifiers that must be complete before this job starts. More... | |
| u16 * | dependency_ids |
| An array of job identifiers that must be complete before this job starts. More... | |
Describes a job to be run.
| u8 dependency_count |
A count of job identifiers that must be complete before this job starts.
| u16* dependency_ids |
An array of job identifiers that must be complete before this job starts.
| pfn_job_start entry_point |
A function pointer to be invoked when the job starts. Required.
| u16 id |
The uniquie identifier of this job.
| pfn_job_on_complete on_fail |
A function pointer to be invoked when the job successfully fails. Optional.
| pfn_job_on_complete on_success |
A function pointer to be invoked when the job successfully completes. Optional.
| void* param_data |
Data to be passed to the entry point upon execution.
| u32 param_data_size |
The size of the data passed to the job.
| job_priority priority |
The priority of this job. Higher priority jobs obviously run sooner.
| void* result_data |
Data to be passed to the success/fail function upon execution, if exists.
| u32 result_data_size |
The size of the data passed to the success/fail function.
| job_type type |
The type of job. Used to determine which thread the job executes on.