MLT 6.26.0
Public Member Functions | Data Fields | Static Private Member Functions
mlt_slices_s Struct Reference

Public Member Functions

void mlt_slices_close (mlt_slices ctx)
 Destroy sliced threading context.
 
int mlt_slices_count_fifo ()
 Get the number of slices for the fifo scheduling policy.
 
int mlt_slices_count_normal ()
 Get the number of slices for the normal scheduling policy.
 
int mlt_slices_count_rr ()
 Get the number of slices for the round robin scheduling policy.
 
mlt_slices mlt_slices_init (int threads, int policy, int priority)
 Initialize a sliced threading context.
 
void mlt_slices_run (mlt_slices ctx, int jobs, mlt_slices_proc proc, void *cookie)
 Run sliced execution.
 

Data Fields

pthread_mutex_t cond_mutex
 
pthread_cond_t cond_var_job
 
pthread_cond_t cond_var_ready
 
int count
 
int f_exit
 
struct mlt_slices_runtime_shead
 
const char * name
 
int readys
 
int ref
 
struct mlt_slices_runtime_stail
 
pthread_t threads [MAX_SLICES]
 

Static Private Member Functions

static mlt_slices mlt_slices_get_global (mlt_schedule_policy policy)
 Get a global shared sliced threading context.
 

Member Function Documentation

◆ mlt_slices_close()

void mlt_slices_close ( mlt_slices  ctx)

Destroy sliced threading context.

Deprecated:
Parameters
ctxcontext pointer

◆ mlt_slices_count_fifo()

int mlt_slices_count_fifo ( )

Get the number of slices for the fifo scheduling policy.

Returns
the number of slices

◆ mlt_slices_count_normal()

int mlt_slices_count_normal ( )

Get the number of slices for the normal scheduling policy.

Returns
the number of slices

◆ mlt_slices_count_rr()

int mlt_slices_count_rr ( )

Get the number of slices for the round robin scheduling policy.

Returns
the number of slices

◆ mlt_slices_get_global()

static mlt_slices mlt_slices_get_global ( mlt_schedule_policy  policy)
staticprivate

Get a global shared sliced threading context.

There are separate contexts for each scheduling policy.

Parameters
policythe thread scheduling policy needed
Returns
the context pointer

◆ mlt_slices_init()

mlt_slices mlt_slices_init ( int  threads,
int  policy,
int  priority 
)

Initialize a sliced threading context.

Deprecated:
Parameters
threadsnumber of threads to use for job list, 0 for #cpus
policyscheduling policy of processing threads, -1 for normal
prioritypriority value that can be used with the scheduling algorithm, -1 for maximum
Returns
the context pointer

◆ mlt_slices_run()

void mlt_slices_run ( mlt_slices  ctx,
int  jobs,
mlt_slices_proc  proc,
void *  cookie 
)

Run sliced execution.

Deprecated:
Parameters
ctxcontext pointer
jobsnumber of jobs to process
procnumber of jobs to process

Field Documentation

◆ cond_mutex

pthread_mutex_t mlt_slices_s::cond_mutex

◆ cond_var_job

pthread_cond_t mlt_slices_s::cond_var_job

◆ cond_var_ready

pthread_cond_t mlt_slices_s::cond_var_ready

◆ count

int mlt_slices_s::count

◆ f_exit

int mlt_slices_s::f_exit

◆ head

struct mlt_slices_runtime_s* mlt_slices_s::head

◆ name

const char* mlt_slices_s::name

◆ readys

int mlt_slices_s::readys

◆ ref

int mlt_slices_s::ref

◆ tail

struct mlt_slices_runtime_s * mlt_slices_s::tail

◆ threads

pthread_t mlt_slices_s::threads[MAX_SLICES]

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