1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-20 11:33:09 -08:00
emacs/mps/code/abq.h
Nick Barnes 7acfca905d Branch imports for masters.
Copied from Perforce
 Change: 23678
 ServerID: perforce.ravenbrook.com
2001-10-31 14:40:56 +00:00

59 lines
1.2 KiB
C

/* impl.h.abq: ABQ INTERFACE
*
* $HopeName: MMsrc!abq.h(trunk.3) $
* Copyright (C) 1998 Harlequin Group plc. All rights reserved.
*
* .purpose: A FIFO queue substrate for impl.c.poolmv2
*
* .source: design.mps.poolmv2
*/
#ifndef abq_h
#define abq_h
#include "meter.h"
#include "cbs.h"
#include "mpm.h"
/* Signatures */
#define ABQSig ((Sig)0x519AB099) /* SIGnature ABQ */
/* Prototypes */
typedef struct ABQStruct *ABQ;
extern Res ABQInit(Arena arena, ABQ abq, void *owner, Count items);
extern Bool ABQCheck(ABQ abq);
extern void ABQFinish(Arena arena, ABQ abq);
extern Res ABQPush(ABQ abq, CBSBlock block);
extern Res ABQPop(ABQ abq, CBSBlock *blockReturn);
extern Res ABQPeek(ABQ abq, CBSBlock *blockReturn);
extern Res ABQDelete(ABQ abq, CBSBlock block);
extern Res ABQDescribe(ABQ abq, mps_lib_FILE *stream);
extern Bool ABQIsEmpty(ABQ abq);
extern Bool ABQIsFull(ABQ abq);
extern Count ABQDepth(ABQ abq);
/* Types */
typedef struct ABQStruct
{
Count elements;
Index in;
Index out;
CBSBlock *queue;
/* Meter queue depth at each operation */
METER_DECL(push);
METER_DECL(pop);
METER_DECL(peek);
METER_DECL(delete);
Sig sig;
} ABQStruct;
#endif /* abq_h */