/* * @OSF_COPYRIGHT@ * COPYRIGHT NOTICE * Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc. * ALL RIGHTS RESERVED (DCE). See the file named COPYRIGHT.DCE in the * src directory for the full copyright text. */ /* * HISTORY * $Log: cma_once.h,v $ * Revision 1.1.2.3 1992/12/15 22:29:12 alan * Insert copyright notices * [1992/12/07 19:40:08 alan] * * Revision 1.1.2.2 1992/09/03 14:38:56 bolinger * Replace current source file with equivalent from DEC BL10+ * source base, as originally integrated in the * nosupport/threads_bl10 tree. (See OT defect 5300.) * [1992/09/02 14:05:13 bolinger] * * Revision 1.1.2.2 1992/05/08 23:37:08 bolinger * BL10 CMA sources from DEC. * [1992/05/08 23:36:53 bolinger] * * Revision 1.1 1992/01/19 14:39:17 devrcs * Initial revision * * $EndLog$ */ /* * %W% (ULTRIX/OSF) %G% */ /* * Copyright (c) 1989, 1990 by * Digital Equipment Corporation, Maynard Massachusetts. * All rights reserved. * * This software is furnished under a license and may be used and copied * only in accordance with the terms of such license and with the * inclusion of the above copyright notice. This software or any other * copies thereof may not be provided or otherwise made available to any * other person. No title to and ownership of the software is hereby * transferred. * * The information in this software is subject to change without notice * and should not be construed as a commitment by DIGITAL Equipment * Corporation. * * DIGITAL assumes no responsibility for the use or reliability of its * software on equipment which is not supplied by DIGITAL. */ /* * FACILITY: * * Concert Multithread Architecture (CMA) services * * ABSTRACT: * * Header file for cma_once.c * * AUTHORS: * * Dave Butenhof * * CREATION DATE: * * 19 July 1989 * * MODIFICATION HISTORY: * * 001 Dave Butenhof 12 October 1989 * Convert to use internal mutex operations. * 002 Dave Butenhof 27 August 1990 * Change flag enum to begin at 0 rather than 1, to make static * initialization easier (for languages without type-based init * or macros). * 003 Paul Curtin 21 May 1991 * Added cma__g_once_mutexes: new queue header * 004 Paul Curtin 24 May 1991 * Added a prototype for cma__reinit_once. */ #ifndef CMA_ONCE #define CMA_ONCE /* * INCLUDE FILES */ #include /* * CONSTANTS AND MACROS */ /* * TYPEDEFS */ typedef enum CMA__T_ONCE_FLAG { cma__c_once_uninit = 0, cma__c_once_initing = 1, cma__c_once_inited = 2 } cma__t_once_flag; typedef struct CMA__T_ONCE_MUTEX { cma__t_queue queue; cma__t_int_mutex *mutex; } cma__t_once_mutex; typedef struct CMA__T_INT_ONCE { cma_t_integer mbz; cma__t_int_mutex *mutex; cma__t_once_flag flag; } cma__t_int_once; /* * GLOBAL DATA */ extern cma__t_queue cma__g_once_mutexes; /* * INTERNAL INTERFACES */ extern void cma__init_once _CMA_PROTOTYPE_ ((void)); extern void cma__reinit_once _CMA_PROTOTYPE_ (( cma_t_integer flag)); #endif /* DEC/CMS REPLACEMENT HISTORY, Element CMA_ONCE.H */ /* *5 10-JUN-1991 19:54:43 SCALES "Convert to stream format for ULTRIX build" */ /* *4 10-JUN-1991 19:21:13 BUTENHOF "Fix the sccs headers" */ /* *3 10-JUN-1991 18:22:38 SCALES "Add sccs headers for Ultrix" */ /* *2 5-JUN-1991 16:13:55 CURTIN "fork work" */ /* *1 12-DEC-1990 21:47:51 BUTENHOF "Client one-time init" */ /* DEC/CMS REPLACEMENT HISTORY, Element CMA_ONCE.H */