Lines Matching refs:key
124 * callers to obtain a key and store a pointer to private data associated
141 /* per-key destructor funcs */
4269 * Needed because NULL destructor means that the key is unused
4277 * Create a key (index into per vnode array)
4288 * if key is allocated, do nothing
4296 * find an unused key
4319 * allocate the next available unused key
4335 * Destroy a key
4344 uint_t key;
4348 * protect the key namespace and our destructor lists
4351 key = *keyp;
4354 ASSERT(key <= vsd_nkeys);
4357 * if the key is valid
4359 if (key != 0) {
4360 uint_t k = key - 1;
4362 * for every vnode with VSD, call key's destructor
4367 * no VSD for key in this vnode
4369 if (key > vsd->vs_nkeys)
4372 * call destructor for key
4377 * reset value for key
4382 * actually free the key (NULL destructor == unused)
4391 * Quickly return the per vnode value that was stored with the specified key
4392 * Assumes the caller is protecting key from vsd_create and vsd_destroy
4396 vsd_get(vnode_t *vp, uint_t key)
4405 if (key && vsd != NULL && key <= vsd->vs_nkeys)
4406 return (vsd->vs_value[key - 1]);
4411 * Set a per vnode value indexed with the specified key
4415 vsd_set(vnode_t *vp, uint_t key, void *value)
4422 if (key == 0)
4436 if (key <= vsd->vs_nkeys) {
4437 vsd->vs_value[key - 1] = value;
4441 ASSERT(key <= vsd_nkeys);
4453 * Allocate vnode local storage and set the value for key
4457 key * sizeof (void *));
4458 vsd->vs_nkeys = key;
4459 vsd->vs_value[key - 1] = value;