#include <stdio.h>
#include <sys/time.h>
#include <stdlib.h>
#include <time.h>
#include "schedule.h"
#include "mesq.h"
#include "collect.h"
#include "misc.h"
#include "statistics.h"
#include "event.h"
#include "startup.h"
#include "global.h"
Include dependency graph for schedule.c:
Defines | |
#define | TIMEDIFF(a, b) ((int)(((unsigned)(a))-((unsigned)(b)))) |
Functions | |
void | hold_to (int dt) |
void | pearlwaiting (int reply_wait) |
void | pearlsend (int dest, int method, int *sp, int len) |
int | receive_time (int *mask, int dt, int *sp) |
int | pearlreceive (int *mask, int *sp) |
char * | stateString (int state) |
void | statistics (int procnr) |
int | catcherfunc () |
void | schedule () |
Variables | |
char * | wt = "pearl" |
int | data_type |
FILE * | statsFile |
int | throughzero = 0 |
Pearl Compiler (c) 1989 University of Amsterdam by B.J. Overeinder & J.G. Stil
|
|
|
Delay the current process by 'dt' time units.
|
|
|
|
Send a message to 'dest'. Mask contains the identifier of the remote method. The contents of the message is on the stack, starting at the position 'sp' points to. 'Len' is the length of the message. If the message is sent, first a check if the destination expects the messages is done. If so, the message is written on the destination's stack. If not, the message is put in the destination's message queue.
|
|
Delay process for 'dt' units and check if there are messages in its message queue. If so, remove process from process table again.
|
|
Look in the message queue of the pearl_current process if there are messages. If so, check if one of them is expected by the process. If so, duplicate message onto processes stack.
|
|
|
|
Put 'statistics' method-label in process's stack and schedule process one pearl_time.
|
|
|
|
Schedule processes from the schedule queue as long as there are processes to be scheduled.
|
|
|
|
|
|
|
|
|