0101c09236
some more fixes. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1070 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
41 lines
1.2 KiB
C
41 lines
1.2 KiB
C
/*************************************************************************
|
|
* *
|
|
* 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 {
|
|
Functor f;
|
|
Term NR; /* next record for same variable */
|
|
Term SG; /* actual suspended goal */
|
|
Term NS; /* other suspended goals */
|
|
} sus_record;
|
|
|
|
typedef struct sus_tag_struct {
|
|
Term ActiveSus; /* if unbound suspension active, if bound terminated */
|
|
CELL sus_id;
|
|
Term TimeStamp; /* actual suspended goal */
|
|
Term 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
|
|
|