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
Richard Brooksby 3d5e2ca85f Adding hopenames back into the master sources, so that they can be included in the union sources along with the id keywords.
This was achieved by partially undoing changelist 24817, including an accidental corruption of eventgen.pl.

Copied from Perforce
 Change: 24877
 ServerID: perforce.ravenbrook.com
2001-12-06 18:14:02 +00:00

60 lines
1.2 KiB
C

/* impl.h.abq: ABQ INTERFACE
*
* $Id$
* $HopeName: MMsrc!abq.h(trunk.4) $
* Copyright (c) 2001 Ravenbrook Limited.
*
* .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 */