This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/H/corout.h
vsc 0101c09236 coroutining is now a part of attvars.
some more fixes.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1070 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2004-06-05 03:37:01 +00:00

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