/* Copyright (c) 1993 Xerox Corporation. All rights reserved. */ /* $Id$ $Date$ * * PCR_ThSpecific.h * * Thread-specific data interface. */ #include /* * Data id & key: */ typedef unsigned PCR_ThSpecific_Key; typedef volatile PCR_ThSpecific_Key * PCR_ThSpecific_KeyPtr; #define PCR_ThSpecific_Key_none ((PCR_ThSpecific_Key)(-1)) /* not a legal key value */ /* * Key creation */ extern PCR_ERes PCR_ThSpecific_CreateKey( void * id, PCR_ThSpecific_KeyPtr kp, void (*destructor)(void *) ); /* Set *kp to a key corresponding to id. If id is NIL, a new key is will be created. If id is non-NIL, and a key has already been created for id, then that existing key will be returned. */ /* * Data getter/setter functions */ extern PCR_ERes PCR_ThSpecific_Set(PCR_ThSpecific_Key k, void * val); extern PCR_ERes PCR_ThSpecific_Get(PCR_ThSpecific_Key k, void ** val); /* $Log$ */