13 #ifndef _CEPTR_PROCESS_H
14 #define _CEPTR_PROCESS_H
18 enum ReductionError {Ascend=-1,Descend=-2,Pushed=-3,Pop=-4,Eval=-5,Block=-6,Done=0,noReductionErr=0,redoReduction,raiseReductionErr,tooFewParamsReductionErr=TOO_FEW_PARAMS_ERR_ID,tooManyParamsReductionErr=TOO_MANY_PARAMS_ERR_ID,signatureMismatchReductionErr=SIGNATURE_MISMATCH_ERR_ID,notProcessReductionError=NOT_A_PROCESS_ERR_ID,divideByZeroReductionErr=ZERO_DIVIDE_ERR_ID,notInSignalContextReductionError=NOT_IN_SIGNAL_CONTEXT_ERR_ID,incompatibleTypeReductionErr=INCOMPATIBLE_TYPE_ERR_ID,unixErrnoReductionErr=UNIX_ERRNO_ERR_ID,deadStreamReadReductionErr=DEAD_STREAM_READ_ERR_ID,missingSemanticMapReductionErr=MISSING_SEMANTIC_MAP_ERR_ID,mismatchSemanticMapReductionErr=MISMATCH_SEMANTIC_MAP_ERR_ID,structureMismatchReductionErr=STRUCTURE_MISMATCH_ERR_ID
21 enum QueueError {noErr = 0, contextNotFoundErr};
23 enum MagicProcesses {MagicReceptors,MagicQuit,MagicDebug};
25 enum IterationPhase {EvalCondition,EvalBody};
26 enum IterationType {IterateTypeCount,IterateTypeUnknown,IterateTypeCond,IterateTypeOnSymbol};
34 enum CondPhase {EvalCondCondtions,EvalCondResult};
40 T *defaultRequestUntil();
46 void _p_enqueue(
Qe **listP,
Qe *e);
47 Qe *__p_find_context(
Qe *e,
int process_id);
48 void __p_unblock(
Q *q,
Qe *e,Error err);
54 void _p_free_context(
R *c);
55 #define _p_addrt2q(q,t) __p_addrt2q(q,t,NULL);
61 T *__p_build_run_tree(
T* code,
int num_params,...);
63 #define __p_make_signature(output_label,output_type,output_sem,...) __p_make_form(PROCESS_SIGNATURE,output_label,output_type,output_sem,__VA_ARGS__)
T * __p_build_wakeup_info(T *code_point, int process_id)
Qe * __p_addrt2q(Q *q, T *t, T *sem_map)
T * _p_make_run_tree(SemTable *sem, Process p, T *params, T *sem_map)
Error __p_check_signature(SemTable *sem, Process p, T *params, T *sem_map)
semantic trees header file
Error __p_reduce_sys_proc(R *context, Symbol s, T *code, Q *q)
Error _p_reduce(SemTable *sem, T *run_tree)
void _p_fill_from_match(SemTable *sem, T *t, T *match_results, T *match_tree)
Error _p_unblock(Q *q, int id)
R * __p_make_context(T *run_tree, R *caller, int process_id, T *sem_map)
T * __p_make_form(Symbol sym, char *output_label, Symbol output_type, SemanticID output_sem,...)
void * _p_reduceq_thread(void *arg)
Error _p_step(Q *q, R **contextP)
void _p_wakeup(Q *q, T *wakeup, T *with, Error err)