StarPU Internal Handbook
errorcheck.h File Reference
#include <starpu.h>

Go to the source code of this file.

Enumerations

enum  _starpu_worker_status {
  STATUS_INVALID , STATUS_UNKNOWN , STATUS_INITIALIZING , STATUS_EXECUTING ,
  STATUS_CALLBACK , STATUS_SCHEDULING , STATUS_WAITING , STATUS_SLEEPING_SCHEDULING ,
  STATUS_SLEEPING
}
 

Functions

void _starpu_set_worker_status (struct _starpu_worker *worker, enum _starpu_worker_status st)
 
void _starpu_set_local_worker_status (enum _starpu_worker_status st)
 
enum _starpu_worker_status _starpu_get_local_worker_status (void)
 
unsigned _starpu_worker_may_perform_blocking_calls (void)
 

Enumeration Type Documentation

◆ _starpu_worker_status

This type describes in which state a worker may be.

Enumerator
STATUS_INVALID 

invalid status (for instance if we request the status of some thread that is not controlled by StarPU

STATUS_UNKNOWN 

everything that does not fit the other status

STATUS_INITIALIZING 

during the initialization

STATUS_EXECUTING 

during the execution of a codelet

STATUS_CALLBACK 

during the execution of the callback

STATUS_SCHEDULING 

while executing the scheduler code

STATUS_WAITING 

while waiting for a data transfer

STATUS_SLEEPING_SCHEDULING 

while sleeping because there is nothing to do, but looking for tasks to do

STATUS_SLEEPING 

while sleeping because there is nothing to do, and not even scheduling

Function Documentation

◆ _starpu_set_worker_status()

void _starpu_set_worker_status ( struct _starpu_worker worker,
enum _starpu_worker_status  st 
)

Specify what the local worker is currently doing (eg. executing a callback). This permits to detect if this is legal to do a blocking call for instance.

◆ _starpu_get_local_worker_status()

enum _starpu_worker_status _starpu_get_local_worker_status ( void  )

Indicate what type of operation the worker is currently doing.

◆ _starpu_worker_may_perform_blocking_calls()

unsigned _starpu_worker_may_perform_blocking_calls ( void  )

It is forbidden to do blocking calls during some operations such as callback or during the execution of a task. This function indicates whether it is legal to call a blocking operation in the current context.