/usr/include/spooles/ChvManager/ChvManager.h is in libspooles-dev 2.2-12build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | /* ChvManager.h */
#include "../Chv.h"
#include "../Lock.h"
/*--------------------------------------------------------------------*/
/*
*/
typedef struct _ChvManager ChvManager ;
struct _ChvManager {
Chv *head ;
Lock *lock ;
int mode ;
int nactive ;
int nbytesactive ;
int nbytesrequested ;
int nbytesalloc ;
int nrequests ;
int nreleases ;
int nlocks ;
int nunlocks ;
} ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods found in basics.c ----------------------------------------
------------------------------------------------------------------------
*/
/*
-----------------------
simplest constructor
created -- 98may02, cca
-----------------------
*/
ChvManager *
ChvManager_new (
void
) ;
/*
-----------------------
set the default fields
created -- 98may02, cca
-----------------------
*/
void
ChvManager_setDefaultFields (
ChvManager *manager
) ;
/*
--------------------------------------------------
clear the data fields, releasing allocated storage
created -- 98may02, cca
--------------------------------------------------
*/
void
ChvManager_clearData (
ChvManager *manager
) ;
/*
------------------------------------------
destructor, free's the object and its data
created -- 98may02, cca
------------------------------------------
*/
void
ChvManager_free (
ChvManager *manager
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods found in init.c ------------------------------------------
------------------------------------------------------------------------
*/
/*
---------------------------------------------------------------
simple initializer
lockflag = 0 --> mutex lock is not allocated or initialized
lockflag = 1 --> mutex lock is allocated and it can synchronize
only threads in this process.
lockflag = 2 --> mutex lock is allocated and it can synchronize
only threads in this and other processes.
mode = 0 --> free object and storage on release
mode = 1 --> recycle object and storage on release
created -- 98may02, cca
---------------------------------------------------------------
*/
void
ChvManager_init (
ChvManager *manager,
int lockflag,
int mode
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods found in util.c ------------------------------------------
------------------------------------------------------------------------
*/
/*
------------------------------------------
return a pointer to a Chv object that has
been initialized with the input parameters
created -- 98may02, cca
------------------------------------------
*/
Chv *
ChvManager_newObject (
ChvManager *manager,
int id,
int nD,
int nL,
int nU,
int symflag
) ;
/*
------------------------------------------
return a pointer to a Chv object that has
been initialized with the input parameters
created -- 98may02, cca
------------------------------------------
*/
Chv *
ChvManager_newObjectOfSizeNbytes (
ChvManager *manager,
int nbytesNeeded
) ;
/*
-----------------------
release a Chv instance
created -- 98may02, cca
-----------------------
*/
void
ChvManager_releaseObject (
ChvManager *manager,
Chv *chv
) ;
/*
------------------------------
release a list of Chv objects
created -- 98may02, cca
------------------------------
*/
void
ChvManager_releaseListOfObjects (
ChvManager *manager,
Chv *head
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods found in IO.c --------------------------------------------
------------------------------------------------------------------------
*/
/*
----------------------------------------
purpose -- to write the object to a file
in human readable form
created -- 98may02, cca
----------------------------------------
*/
void
ChvManager_writeForHumanEye (
ChvManager *manager,
FILE *fp
) ;
/*--------------------------------------------------------------------*/
|