Kohi Game Engine
job_info Struct Reference

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...
 
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...
 

Detailed Description

Describes a job to be run.

Field Documentation

◆ entry_point

pfn_job_start entry_point

A function pointer to be invoked when the job starts. Required.

◆ on_fail

A function pointer to be invoked when the job successfully fails. Optional.

◆ on_success

pfn_job_on_complete on_success

A function pointer to be invoked when the job successfully completes. Optional.

◆ param_data

void* param_data

Data to be passed to the entry point upon execution.

◆ param_data_size

u32 param_data_size

The size of the data passed to the job.

◆ priority

job_priority priority

The priority of this job. Higher priority jobs obviously run sooner.

◆ result_data

void* result_data

Data to be passed to the success/fail function upon execution, if exists.

◆ result_data_size

u32 result_data_size

The size of the data passed to the success/fail function.

◆ type

job_type type

The type of job. Used to determine which thread the job executes on.


The documentation for this struct was generated from the following file: