2 * Copyright 2000, International Business Machines Corporation and others.
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
14 * The way to use this package is:
15 * If the cache pointer is not NULL, call afs_findAxs, and if it's not
16 * NULL, use its access field
18 * axs_Alloc a new one,
20 * insert it at the head of the list.
22 * Of course, don't forget to axs_Free them occasionally,
24 * Alloc and Free need a lock on the freelist, the other guys are safe if the
25 * parent structure is locked, but probably REQUIRE the parent to be locked...
29 afs_int32 uid
; /* most frequently used field, I think */
31 struct axscache
*next
;
34 /* DON'T use this with a NULL pointer!
35 * the quick check should cover 99.9% of the cases
37 #define afs_FindAxs(cachep,id) (((cachep)->uid == id) ? (cachep) : afs_SlowFindAxs(&(cachep),(id)))
39 #define axs_Front(head,pp,p) {(pp)->next = (p)->next; (p)->next= *(head);*(head)=(p);}
41 #define afs_AddAxs(cachep,id,bits) { \
42 struct axscache *ac; \
43 if ((ac = axs_Alloc())) { \
45 ac->axess = (afs_int32)(bits); \
46 ac->next = (cachep); \