pmm  1.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions
pmm_scheduler.c File Reference

Choose next routine to benchmark. More...

#include "pmm_model.h"
#include "pmm_cond.h"

Go to the source code of this file.

Functions

int schedule_routine (struct pmm_routine **scheduled, struct pmm_routine **r, int n)

Detailed Description

Choose next routine to benchmark.

Code to select next routine that should be benchmarked.

Definition in file pmm_scheduler.c.

Function Documentation

int schedule_routine ( struct pmm_routine **  scheduled,
struct pmm_routine **  r,
int  n 
)

Function handles the chosing of the next routine to benchmark.

Parameters
scheduledpointer to pointer describing routine picked for scheduling
rpointer to array of routines from which to pick
nnumber of routines in array
Returns
0 if all routines are already complete (so we don't need to try to schedule them any longer), 1 if there is a schedulable routine, 2 if there are no schedulable routines at present (but some are still incomplete)

Definition at line 48 of file pmm_scheduler.c.