/* begincopyright Copyright (c) 1988 Xerox Corporation. All rights reserved. Use and copying of this software and preparation of derivative works based upon this software are permitted. Any distribution of this software or derivative works must comply with all applicable United States export control laws. This software is made available AS IS, and Xerox Corporation makes no warranty about the software, its performance or its conformity to any specification. Any person obtaining a copy of this software is requested to send their name and post office or electronic mail address to: PCR Coordinator Xerox PARC 3333 Coyote Hill Rd. Palo Alto, CA 94304 endcopyright */ /* * ThreadsTermination.h * * Registered cleanup procs for PCR termination. * * Demers, December 13, 1990 8:53:55 am PST */ #ifndef _XR_THREADS_TERMINATION_ #define _XR_THREADS_TERMINATION_ #include "xr/BasicTypes.h" int XR_RegisterTerminationCleanupProc(/* void (**proc)(XR_Pointer clientData), -- okay to pass a top-level mesa proc here XR_Pointer clientData */); /* Register a cleanup proc to be called automatically just before PCR terminates. The cleanup proc is called ( (**proc)(clientData) ) from a Unix process rather than a thread -- it should do native Unix system calls and avoid thread operations such as XR_Fork or XR_MonitorEntry. May be called during system initialization or from a thread. Return 0 on success, (-1) with errno set on error. */ #endif _XR_THREADS_TERMINATION_