1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-17 16:41:17 -08:00
emacs/mps/src/th.h
Pekka Pirinen ca0cc72e8f Merging mmdevel_config_thread
Copied from Perforce
 Change: 18642
 ServerID: perforce.ravenbrook.com
1997-08-20 00:14:49 +01:00

52 lines
1.3 KiB
C

/* impl.h.th: THREAD MANAGER
*
* $HopeName: MMsrc!th.h(MMdevel_config_thread.2) $
* Copyright (C) 1995 Harlequin Group, all rights reserved
*
* .readership: MM developers.
*
* .purpose: Provides thread suspension facilities to the shield.
* See design.mps.thread-manager. Each thread has to be
* individually registered and deregistered with an arena.
*/
#ifndef th_h
#define th_h
#include "mpm.h"
extern Bool ThreadCheck(Thread thread);
extern Res ThreadDescribe(Thread thread, mps_lib_FILE *stream);
/* == Register/Deregister ==
*
* Explicitly register/deregister a thread on the arena threadRing.
* Register returns a "Thread" value which needs to be used
* for deregistration.
*
* Threads must not be multiply registered in the same arena.
*/
extern Res ThreadRegister(Thread *threadReturn, Arena arena);
extern void ThreadDeregister(Thread thread, Arena arena);
/* == ThreadRingSuspend/Resume ==
*
* These functions suspend/resume the threads on the ring.
* If the current thread is among them, it is not suspended,
* nor is any attempt to resume it made.
*/
extern void ThreadRingSuspend(Ring threadRing);
extern void ThreadRingResume(Ring threadRing);
extern Arena ThreadArena(Thread thread);
extern Res ThreadScan(ScanState ss, Thread thread, void *stackBot);
#endif /* th_h */