8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / libtnfprobe / prb_internals.h
blob8cd672e39503a198c687102cb1e1a21d1a4dcdfc
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright (c) 1994, by Sun Microsytems, Inc.
26 #ifndef _PRB_INTERNALS_H
27 #define _PRB_INTERNALS_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
32 * Includes
35 #include <synch.h>
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
42 * Notes:
44 * There is a memseg statically allocated in libtnfprobe. This memory is
45 * consumed by the internal and external probe control fucntions for
46 * initial_final blocks, and compositions.
48 * There is no mechanism for freeing this memory; it is leaked. This is
49 * because the overhead involved to protect uses of old memory is too
50 * high for probes.
52 * The target program internally allocates memory from the bottom edge of
53 * the segment, and the external program allocates from the high edge of
54 * the segment.
56 * The i_reqsz field is set by the internal memory allocation routine
57 * while it is allocating. If the external process happens to freeze the
58 * target process while it is in the middle of an internal allocation the
59 * i_reqsz field allows the external process to be extra conservative in
60 * avoiding a memory collision.
64 * Typedefs
67 typedef struct tnf_memseg
69 char * min_p; /* points to min free byte */
70 char * max_p; /* points past max free byte */
72 mutex_t i_lock; /* internal sync lock */
73 size_t i_reqsz; /* internal request size */
75 } tnf_memseg_t;
79 * Declarations
82 char * __tnf_probe_alloc(size_t size);
84 #ifdef __cplusplus
86 #endif
88 #endif /* _PRB_INTERNALS_H */