Coda Distributed File System
recvarl.h
Go to the documentation of this file.
1/* BLURB gpl
2
3 Coda File System
4 Release 8
5
6 Copyright (c) 1987-2021 Carnegie Mellon University
7 Additional copyrights listed below
8
9This code is distributed "AS IS" without warranty of any kind under
10the terms of the GNU General Public Licence Version 2, as shown in the
11file LICENSE. The technical and financial contributors to Coda are
12listed in the file CREDITS.
13
14 Additional copyrights
15 none currently
16
17#*/
18
19#ifndef _REC_VARL_H
20#define _REC_VARL_H 1
21/*
22 * varl.h
23 * declaration of the variable length class
24 * created 02/20/92 -- Puneet Kumar
25 *
26 */
27
28#include <coda_tsa.h>
29
30typedef int recvarl_length_t; // to allow sizeof() in recvarl::new()
31
32class recvarl {
33public:
34 recvarl_length_t length; /* end of the class */
35 unsigned long vfld[1]; /* beginning of variable length part */
36
37 void *operator new(size_t, int) REQUIRES_TRANSACTION; /* the real new */
38 void *operator new(size_t); /* dummy to keep g++ happy */
39 void operator delete(void *);
41 ~recvarl();
42 int size(); /* return sizeof(varl) for a particular class instance */
43 void *end(); /* return pointer past end of block */
45};
46#endif /* _REC_VARL_H */
Definition: recvarl.h:32
void * end()
Definition: recvarl.cc:86
int size()
Definition: recvarl.cc:81
void destroy() REQUIRES_TRANSACTION
Definition: recvarl.cc:92
unsigned long vfld[1]
Definition: recvarl.h:35
recvarl(int) REQUIRES_TRANSACTION
Definition: recvarl.cc:65
recvarl_length_t length
Definition: recvarl.h:34
~recvarl()
Definition: recvarl.cc:76
#define REQUIRES_TRANSACTION
Definition: coda_tsa.h:107
int recvarl_length_t
Definition: recvarl.h:30