Update NEWS for 1.6.22
[pkg-k5-afs_openafs.git] / src / volser / voltrans_inline.h
blobb3736f7f48e2fc495bf074f07c0a72c330a6ed93
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * Copyright 2009, Sine Nomine Associates
4 * All Rights Reserved.
6 * This software has been released under the terms of the IBM Public
7 * License. For details, see the LICENSE file in the top-level source
8 * directory or online at http://www.openafs.org/dl/license10.html
9 */
11 #ifndef _VOLTRANS_INLINE_H
12 #define _VOLTRANS_INLINE_H
14 #include "volser.h"
16 /**
17 * Save the most recent call and procedure name for
18 * transaction status reporting.
20 * \param tt transaction object
21 * \param call the rx call object, NULL if none
22 * \param name procedure name, NULL if none
24 * \pre VTRANS_OBJ_LOCK on tt must be held
26 static_inline void
27 TSetRxCall_r(struct volser_trans *tt, struct rx_call *call, const char *name)
29 if (name) {
30 strlcpy(tt->lastProcName, name, sizeof(tt->lastProcName));
32 if (call) {
33 tt->rxCallPtr = call;
37 /**
38 * Clears the most recent call object.
40 * \param tt transaction object
42 * \pre VTRANS_OBJ_LOCK on tt must be held
44 static_inline void
45 TClearRxCall_r(struct volser_trans *tt)
47 tt->rxCallPtr = NULL;
50 /**
51 * Save the most recent call and procedure name for
52 * transaction status reporting.
54 * \param tt transaction object
55 * \param call the rx call object, NULL if none
56 * \param name procedure name, NULL if none
58 * \pre VTRANS_OBJ_LOCK on tt must not be held
60 static_inline void
61 TSetRxCall(struct volser_trans *tt, struct rx_call *call, const char *name)
63 VTRANS_OBJ_LOCK(tt);
64 TSetRxCall_r(tt, call, name);
65 VTRANS_OBJ_UNLOCK(tt);
68 /**
69 * Clears the most recent call object.
71 * \param tt transaction object
73 * \pre VTRANS_OBJ_LOCK on tt must not be held
75 static_inline void
76 TClearRxCall(struct volser_trans *tt)
78 VTRANS_OBJ_LOCK(tt);
79 TClearRxCall_r(tt);
80 VTRANS_OBJ_UNLOCK(tt);
83 #endif /* _VOLTRANS_INLINE_H */