1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-19 04:10:18 -08:00
emacs/mps/code/pthrdext.h
Richard Brooksby c0bb4cd3cd Removing hopenames from the master sources.
This change will be integrated but ignored (-ay) to the gg-epcore/union sources, so that they retain HopeNames.

Copied from Perforce
 Change: 24911
 ServerID: perforce.ravenbrook.com
2001-12-07 13:19:25 +00:00

68 lines
1.5 KiB
C

/* impl.h.pthreadext: POSIX THREAD EXTENSIONS
*
* $Id$
* 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 */