1 /* $Id: ocm_proc.h,v 1.4 1994/06/24 10:08:36 ceriel Exp $ */
3 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4 * See the copyright notice in the ACK home directory, in the file "Copyright".
6 /* process.h - Define administration types and functions
8 * This file is to be included by implementors of the higher
12 #include "ocm_parco.h"
14 #ifndef ptrdiff /* This type must be able to hold a pointer difference */
15 #if EM_WSIZE <EM_PSIZE
18 #define ptrdiff int /* Define as long int if necessary */
23 void *alloc(), free();
25 typedef ptrdiff wordsize, identification;
29 void top_load(); /* Primitives */
34 struct process *next; /* Next process in the same group */
35 struct procgroup *down; /* Process group running under this process */
36 void *stack; /* Pointer to the saved stack top */
37 identification id; /* Coroutine identification */
40 #define init_between __i_b__ /* These names are hidden */
41 #define save_between __s_b__
42 #define load_betweens __l_b__
43 #define delete_between __d_b__
45 void init_between(), save_between(), load_betweens(), delete_between();
48 struct process **active;/* Active process within this group */
49 struct procgroup *up; /* The group that this group belongs to */
50 struct process *first; /* List of processes belonging to this group */
51 void *s_brk; /* Point where the stack is split */
52 void *between; /* Stack space between s_brk and up->s_brk */
55 #define group __grp__ /* Ignore this please */
56 #define highest_group __hgrp__
58 extern struct procgroup *group; /* Current running group */
59 extern struct procgroup *highest_group; /* highest group that has been seen
60 * while searching for a process