1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 23:31:55 -08:00
emacs/mps/code/pthrdext.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

69 lines
1.5 KiB
C

/* impl.h.pthreadext: POSIX THREAD EXTENSIONS
*
* $Id$
* $HopeName: MMsrc!pthrdext.h(trunk.1) $
* Copyright (c) 2001 Ravenbrook Limited.
*
* .readership: MM developers.
*
* .purpose: Provides extension to Pthreads.
*/
#ifndef pthreadext_h
#define pthreadext_h
#include <signal.h>
#include "mpm.h"
#define PThreadextSig ((Sig)0x519B286E) /* SIGnature PTHReadExt */
/* PThreadext -- extension datatype */
typedef struct PThreadextStruct *PThreadext;
/* PThreadextStruct -- structure definition
*
* Should be embedded in a client structure
*/
typedef struct PThreadextStruct {
Sig sig; /* design.mps.sig */
pthread_t id; /* Thread ID */
MutatorFaultContext suspendedMFC; /* context if suspended */
RingStruct threadRing; /* ring of suspended threads */
RingStruct idRing; /* duplicate suspensions for id */
} PThreadextStruct;
/* PThreadextCheck -- Check a pthreadext */
extern Bool PThreadextCheck(PThreadext pthreadext);
/* PThreadextInit -- Initialize a pthreadext */
extern void PThreadextInit(PThreadext pthreadext, pthread_t id);
/* PThreadextFinish -- Finish a pthreadext */
extern void PThreadextFinish(PThreadext pthreadext);
/* PThreadextSuspend -- Suspend a pthreadext and return its context. */
extern Res PThreadextSuspend(PThreadext pthreadext,
MutatorFaultContext *contextReturn);
/* PThreadextResume -- Resume a suspended pthreadext */
extern Res PThreadextResume(PThreadext pthreadext);
#endif /* pthreadext_h */