backport to buster
[hcoop/debian/openafs.git] / src / afs / afs_cbqueue.h
CommitLineData
805e021f
CE
1/*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
4 *
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
8 */
9
10/*
11 * This package is used to actively manage the expiration of callbacks,
12 * so that the rest of the cache manager doesn't need to compute
13 * whether a callback has expired or not, but can tell with one simple
14 * check, that is, whether the CStatd bit is on or off.
15 */
16
17/* how many seconds in a slot */
18#define CBHTSLOTLEN 128
19/* how many slots in the table */
20#define CBHTSIZE 128
21/* 7 is LOG2(slotlen) */
22#define CBHash(t) ((t)>>7)
23
24#define CBQTOV(e) ((struct vcache *)(((char *) (e)) - (((char *)(&(((struct vcache *)(e))->callsort))) - ((char *)(e)))))