xref: /openbsd-src/gnu/usr.bin/binutils/gdb/osf-share/cma_sequence.h (revision e93f7393d476ad1c5192174ea92f14ecc97182e7)
1*e93f7393Sniklas /*
2*e93f7393Sniklas  * (c) Copyright 1990-1996 OPEN SOFTWARE FOUNDATION, INC.
3*e93f7393Sniklas  * (c) Copyright 1990-1996 HEWLETT-PACKARD COMPANY
4*e93f7393Sniklas  * (c) Copyright 1990-1996 DIGITAL EQUIPMENT CORPORATION
5*e93f7393Sniklas  * (c) Copyright 1991, 1992 Siemens-Nixdorf Information Systems
6*e93f7393Sniklas  * To anyone who acknowledges that this file is provided "AS IS" without
7*e93f7393Sniklas  * any express or implied warranty: permission to use, copy, modify, and
8*e93f7393Sniklas  * distribute this file for any purpose is hereby granted without fee,
9*e93f7393Sniklas  * provided that the above copyright notices and this notice appears in
10*e93f7393Sniklas  * all source code copies, and that none of the names listed above be used
11*e93f7393Sniklas  * in advertising or publicity pertaining to distribution of the software
12*e93f7393Sniklas  * without specific, written prior permission.  None of these organizations
13*e93f7393Sniklas  * makes any representations about the suitability of this software for
14*e93f7393Sniklas  * any purpose.
15*e93f7393Sniklas  */
16*e93f7393Sniklas /*
17*e93f7393Sniklas  *	Header file for sequence generator functions
18*e93f7393Sniklas  */
19*e93f7393Sniklas 
20*e93f7393Sniklas #ifndef CMA_SEQUENCE
21*e93f7393Sniklas #define CMA_SEQUENCE
22*e93f7393Sniklas 
23*e93f7393Sniklas /*
24*e93f7393Sniklas  *  INCLUDE FILES
25*e93f7393Sniklas  */
26*e93f7393Sniklas 
27*e93f7393Sniklas /*
28*e93f7393Sniklas  * CONSTANTS AND MACROS
29*e93f7393Sniklas  */
30*e93f7393Sniklas 
31*e93f7393Sniklas /*
32*e93f7393Sniklas  * TYPEDEFS
33*e93f7393Sniklas  */
34*e93f7393Sniklas 
35*e93f7393Sniklas #ifndef __STDC__
36*e93f7393Sniklas struct CMA__T_INT_MUTEX;
37*e93f7393Sniklas #endif
38*e93f7393Sniklas 
39*e93f7393Sniklas typedef struct CMA__T_SEQUENCE {
40*e93f7393Sniklas     struct CMA__T_INT_MUTEX	*mutex;	/* Serialize access to counter */
41*e93f7393Sniklas     cma_t_natural		seq;	/* Sequence number for object */
42*e93f7393Sniklas     } cma__t_sequence;
43*e93f7393Sniklas 
44*e93f7393Sniklas /*
45*e93f7393Sniklas  *  GLOBAL DATA
46*e93f7393Sniklas  */
47*e93f7393Sniklas 
48*e93f7393Sniklas /*
49*e93f7393Sniklas  * INTERNAL INTERFACES
50*e93f7393Sniklas  */
51*e93f7393Sniklas 
52*e93f7393Sniklas extern cma_t_natural cma__assign_sequence (cma__t_sequence *);
53*e93f7393Sniklas 
54*e93f7393Sniklas extern void cma__init_sequence (cma__t_sequence *);
55*e93f7393Sniklas 
56*e93f7393Sniklas #endif
57