This commit was generated by cvs2svn to compensate for changes in r4,
which included commits to RCS files with non-trunk default branches. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@5 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
42
H/corout.h
Normal file
42
H/corout.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/*************************************************************************
|
||||
* *
|
||||
* YAP Prolog *
|
||||
* *
|
||||
* Yap Prolog was developed at NCCUP - Universidade do Porto *
|
||||
* *
|
||||
* Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997 *
|
||||
* *
|
||||
**************************************************************************
|
||||
* *
|
||||
* File: corout.c *
|
||||
* Last rev: *
|
||||
* mods: *
|
||||
* comments: Co-routining from within YAP *
|
||||
* *
|
||||
*************************************************************************/
|
||||
#ifdef SCCS
|
||||
static char SccsId[]="%W% %G%";
|
||||
#endif
|
||||
|
||||
typedef struct sus_record_struct {
|
||||
struct sus_record_struct *NR; /* next record */
|
||||
Term SG; /* suspended goal */
|
||||
#ifdef MULTI_ASSIGNMENT_VARIABLES
|
||||
struct sus_record_struct *NS; /* other suspended goals */
|
||||
#endif
|
||||
} sus_record;
|
||||
|
||||
typedef struct sus_tag_struct {
|
||||
Term ActiveSus; /* if unbound suspension active, if bound terminated */
|
||||
CELL sus_id;
|
||||
sus_record *SG; /* list of suspended goals */
|
||||
} sus_tag;
|
||||
|
||||
#ifdef COROUTINING
|
||||
/*********** tags for suspension variables */
|
||||
|
||||
#define AbsSuspendedVar(sustag_ptr) AbsAppl(((CELL *)(sustag_ptr)))
|
||||
#define RepSuspendedVar(val) ((sus_tag *)RepAppl(val))
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user