| Code Coverage: vinyl-cache/lib/libvsc/VSC_ssy.c |
| |
| 82217aa4fc7094b3610340078afaf78cd95a8ec9 |
| |
| 0 |
|
/* |
| 1 |
|
* NB: This file is machine generated, DO NOT EDIT! |
| 2 |
|
* |
| 3 |
|
* Edit ssy.vsc and run lib/libvsc/vsctool.py instead. |
| 4 |
|
*/ |
| 5 |
|
|
| 6 |
|
#include "config.h" |
| 7 |
|
#include <stdio.h> |
| 8 |
|
#include <stdarg.h> |
| 9 |
|
#include "vdef.h" |
| 10 |
|
#include "vas.h" |
| 11 |
|
#include "vrt.h" |
| 12 |
|
#include "VSC_ssy.h" |
| 13 |
|
|
| 14 |
|
static const char vsc_ssy_name[] = "SSY"; |
| 15 |
|
|
| 16 |
|
#define PARANOIA(a,n) \ |
| 17 |
|
v_static_assert( \ |
| 18 |
|
offsetof(struct VSC_ssy, a) == n, \ |
| 19 |
|
"VSC element '" #a "' at wrong offset") |
| 20 |
|
|
| 21 |
|
PARANOIA(c_allocobj_success, 0); |
| 22 |
|
PARANOIA(c_allocobj_fail, 8); |
| 23 |
|
PARANOIA(c_getspace_success, 16); |
| 24 |
|
PARANOIA(c_getspace_fail, 24); |
| 25 |
|
#undef PARANOIA |
| 26 |
|
|
| 27 |
|
static const unsigned char vsc_ssy_json[1008] = { |
| 28 |
|
123,34,118,101,114,115,105,111,110,34,58,34,49,34,44,34,110,97,109,101, |
| 29 |
|
34,58,34,115,115,121,34,44,34,111,110,101,108,105,110,101,114,34,58, |
| 30 |
|
34,83,121,110,116,104,32,83,116,101,118,101,100,111,114,101,32,67,111, |
| 31 |
|
117,110,116,101,114,115,34,44,34,111,114,100,101,114,34,58,52,48,44, |
| 32 |
|
34,100,111,99,115,34,58,34,34,44,34,101,108,101,109,101,110,116,115, |
| 33 |
|
34,58,52,44,34,101,108,101,109,34,58,123,34,99,95,97,108,108,111,99, |
| 34 |
|
111,98,106,95,115,117,99,99,101,115,115,34,58,123,34,116,121,112,101, |
| 35 |
|
34,58,34,99,111,117,110,116,101,114,34,44,34,99,116,121,112,101,34,58, |
| 36 |
|
34,117,105,110,116,54,52,95,116,34,44,34,108,101,118,101,108,34,58,34, |
| 37 |
|
105,110,102,111,34,44,34,111,110,101,108,105,110,101,114,34,58,34,97, |
| 38 |
|
108,108,111,99,111,98,106,32,114,101,113,117,101,115,116,115,32,115, |
| 39 |
|
117,99,99,101,101,100,101,100,34,44,34,102,111,114,109,97,116,34,58, |
| 40 |
|
34,105,110,116,101,103,101,114,34,44,34,105,110,100,101,120,34,58,48, |
| 41 |
|
44,34,110,97,109,101,34,58,34,99,95,97,108,108,111,99,111,98,106,95, |
| 42 |
|
115,117,99,99,101,115,115,34,44,34,100,111,99,115,34,58,34,92,116,78, |
| 43 |
|
117,109,98,101,114,32,111,102,32,116,105,109,101,115,32,97,110,32,97, |
| 44 |
|
108,108,111,99,111,98,106,32,114,101,113,117,101,115,116,32,115,117, |
| 45 |
|
99,99,101,101,100,101,100,46,34,125,44,34,99,95,97,108,108,111,99,111, |
| 46 |
|
98,106,95,102,97,105,108,34,58,123,34,116,121,112,101,34,58,34,99,111, |
| 47 |
|
117,110,116,101,114,34,44,34,99,116,121,112,101,34,58,34,117,105,110, |
| 48 |
|
116,54,52,95,116,34,44,34,108,101,118,101,108,34,58,34,105,110,102,111, |
| 49 |
|
34,44,34,111,110,101,108,105,110,101,114,34,58,34,97,108,108,111,99, |
| 50 |
|
111,98,106,32,114,101,113,117,101,115,116,115,32,102,97,105,108,101, |
| 51 |
|
100,34,44,34,102,111,114,109,97,116,34,58,34,105,110,116,101,103,101, |
| 52 |
|
114,34,44,34,105,110,100,101,120,34,58,56,44,34,110,97,109,101,34,58, |
| 53 |
|
34,99,95,97,108,108,111,99,111,98,106,95,102,97,105,108,34,44,34,100, |
| 54 |
|
111,99,115,34,58,34,92,116,78,117,109,98,101,114,32,111,102,32,116,105, |
| 55 |
|
109,101,115,32,97,110,32,97,108,108,111,99,111,98,106,32,114,101,113, |
| 56 |
|
117,101,115,116,32,102,97,105,108,101,100,46,34,125,44,34,99,95,103, |
| 57 |
|
101,116,115,112,97,99,101,95,115,117,99,99,101,115,115,34,58,123,34, |
| 58 |
|
116,121,112,101,34,58,34,99,111,117,110,116,101,114,34,44,34,99,116, |
| 59 |
|
121,112,101,34,58,34,117,105,110,116,54,52,95,116,34,44,34,108,101,118, |
| 60 |
|
101,108,34,58,34,105,110,102,111,34,44,34,111,110,101,108,105,110,101, |
| 61 |
|
114,34,58,34,103,101,116,115,112,97,99,101,32,114,101,113,117,101,115, |
| 62 |
|
116,115,32,115,117,99,99,101,101,100,101,100,34,44,34,102,111,114,109, |
| 63 |
|
97,116,34,58,34,105,110,116,101,103,101,114,34,44,34,105,110,100,101, |
| 64 |
|
120,34,58,49,54,44,34,110,97,109,101,34,58,34,99,95,103,101,116,115, |
| 65 |
|
112,97,99,101,95,115,117,99,99,101,115,115,34,44,34,100,111,99,115,34, |
| 66 |
|
58,34,92,116,78,117,109,98,101,114,32,111,102,32,116,105,109,101,115, |
| 67 |
|
32,97,110,32,103,101,116,115,112,97,99,101,32,114,101,113,117,101,115, |
| 68 |
|
116,32,115,117,99,99,101,101,100,101,100,46,34,125,44,34,99,95,103,101, |
| 69 |
|
116,115,112,97,99,101,95,102,97,105,108,34,58,123,34,116,121,112,101, |
| 70 |
|
34,58,34,99,111,117,110,116,101,114,34,44,34,99,116,121,112,101,34,58, |
| 71 |
|
34,117,105,110,116,54,52,95,116,34,44,34,108,101,118,101,108,34,58,34, |
| 72 |
|
105,110,102,111,34,44,34,111,110,101,108,105,110,101,114,34,58,34,103, |
| 73 |
|
101,116,115,112,97,99,101,32,114,101,113,117,101,115,116,115,32,102, |
| 74 |
|
97,105,108,101,100,34,44,34,102,111,114,109,97,116,34,58,34,105,110, |
| 75 |
|
116,101,103,101,114,34,44,34,105,110,100,101,120,34,58,50,52,44,34,110, |
| 76 |
|
97,109,101,34,58,34,99,95,103,101,116,115,112,97,99,101,95,102,97,105, |
| 77 |
|
108,34,44,34,100,111,99,115,34,58,34,92,116,78,117,109,98,101,114,32, |
| 78 |
|
111,102,32,116,105,109,101,115,32,97,110,32,103,101,116,115,112,97,99, |
| 79 |
|
101,32,114,101,113,117,101,115,116,32,102,97,105,108,101,100,46,34,125, |
| 80 |
|
125,125,0 |
| 81 |
|
}; |
| 82 |
|
|
| 83 |
|
// { |
| 84 |
|
// "version": "1", |
| 85 |
|
// "name": "ssy", |
| 86 |
|
// "oneliner": "Synth Stevedore Counters", |
| 87 |
|
// "order": 40, |
| 88 |
|
// "docs": "", |
| 89 |
|
// "elements": 4, |
| 90 |
|
// "elem": { |
| 91 |
|
// "c_allocobj_success": { |
| 92 |
|
// "type": "counter", |
| 93 |
|
// "ctype": "uint64_t", |
| 94 |
|
// "level": "info", |
| 95 |
|
// "oneliner": "allocobj requests succeeded", |
| 96 |
|
// "format": "integer", |
| 97 |
|
// "index": 0, |
| 98 |
|
// "name": "c_allocobj_success", |
| 99 |
|
// "docs": "\tNumber of times an allocobj request succeeded." |
| 100 |
|
// }, |
| 101 |
|
// "c_allocobj_fail": { |
| 102 |
|
// "type": "counter", |
| 103 |
|
// "ctype": "uint64_t", |
| 104 |
|
// "level": "info", |
| 105 |
|
// "oneliner": "allocobj requests failed", |
| 106 |
|
// "format": "integer", |
| 107 |
|
// "index": 8, |
| 108 |
|
// "name": "c_allocobj_fail", |
| 109 |
|
// "docs": "\tNumber of times an allocobj request failed." |
| 110 |
|
// }, |
| 111 |
|
// "c_getspace_success": { |
| 112 |
|
// "type": "counter", |
| 113 |
|
// "ctype": "uint64_t", |
| 114 |
|
// "level": "info", |
| 115 |
|
// "oneliner": "getspace requests succeeded", |
| 116 |
|
// "format": "integer", |
| 117 |
|
// "index": 16, |
| 118 |
|
// "name": "c_getspace_success", |
| 119 |
|
// "docs": "\tNumber of times an getspace request succeeded." |
| 120 |
|
// }, |
| 121 |
|
// "c_getspace_fail": { |
| 122 |
|
// "type": "counter", |
| 123 |
|
// "ctype": "uint64_t", |
| 124 |
|
// "level": "info", |
| 125 |
|
// "oneliner": "getspace requests failed", |
| 126 |
|
// "format": "integer", |
| 127 |
|
// "index": 24, |
| 128 |
|
// "name": "c_getspace_fail", |
| 129 |
|
// "docs": "\tNumber of times an getspace request failed." |
| 130 |
|
// } |
| 131 |
|
// } |
| 132 |
|
// } |
| 133 |
|
|
| 134 |
|
|
| 135 |
|
struct VSC_ssy* |
| 136 |
|
VSC_ssy_New(struct vsmw_cluster *vc, |
| 137 |
|
struct vsc_seg **sg, const char *fmt, ...) |
| 138 |
1023 |
{ |
| 139 |
1023 |
va_list ap; |
| 140 |
1023 |
struct VSC_ssy *retval; |
| 141 |
|
|
| 142 |
1023 |
va_start(ap, fmt); |
| 143 |
1023 |
retval = VRT_VSC_Allocv(vc, sg, vsc_ssy_name, VSC_ssy_size, |
| 144 |
1023 |
vsc_ssy_json, sizeof vsc_ssy_json, fmt, ap); |
| 145 |
1023 |
va_end(ap); |
| 146 |
1023 |
return(retval); |
| 147 |
1023 |
} |
| 148 |
|
|
| 149 |
|
void |
| 150 |
|
VSC_ssy_Destroy(struct vsc_seg **sg) |
| 151 |
1012 |
{ |
| 152 |
1012 |
struct vsc_seg *p; |
| 153 |
|
|
| 154 |
1012 |
AN(sg); |
| 155 |
1012 |
p = *sg; |
| 156 |
|
*sg = NULL; |
| 157 |
1012 |
VRT_VSC_Destroy(vsc_ssy_name, p); |
| 158 |
1012 |
} |