Name

execute_in_process_context — reliably execute the routine with user context

Synopsis

int execute_in_process_context (void (* fn) (void *data),
 void *  data,
 struct execute_work *  ew);

Arguments

fn

the function to execute

data

data to pass to the function

ew

guaranteed storage for the execute work structure (must be available when the work executes)

Description

Executes the function immediately if process context is available, otherwise schedules the function for delayed execution.

Returns

0 - function was executed 1 - function was scheduled for execution