Lines Matching defs:data
35 * Access control structure for a piece of nscd data. This structure
36 * is always tagged before the nscd data. nscd_alloc, which should
42 void *data; /* addr of real data */
43 void (*free_func)(nscd_acc_data_t *data); /* destructor */
59 if (access->data != data) \
64 ((void *)((char *)data - sizeof_access))
66 static void _nscd_free(nscd_acc_data_t *data);
71 * Decrements the usage count maintained in the access data
72 * tagged before 'data'. Delete the nscd data item if the delete
77 nscd_acc_data_t *data)
82 if (data == NULL)
88 (me, "data = %p, access->data = %p, "
90 data, access->data, access->seq_num, access->nUse);
103 (me, "deleting data %p\n", access->data);
104 (access->free_func)(access->data);
112 _nscd_free(data);
121 * Marks the nscd data item as to-be-deleted and then releases
123 * will destroy the data.)
126 * caller has created the nscd data with _nscd_alloc
127 * (with the exception of _nscd_set). That nscd data
132 nscd_acc_data_t *data)
137 if (data == NULL)
143 (me, "data = %p, access->data = %p\n", data, access->data);
150 _nscd_release(data);
156 * Increment the usage count by one if 'data' can
161 nscd_acc_data_t *data)
164 void *ret = data;
168 if (data == NULL)
174 (me, "data = %p, access->data = %p, seq#= %lld, nUse = %d\n",
175 data, access->data, access->seq_num, access->nUse);
183 * to prevent the access data from being
186 if ((addr_rwlock = _nscd_is_int_addr(data,
189 (me, "internal address %p not found\n", data);
212 * _nscd_set sets the address of a nscd data item
213 * to 'new' and delete the old nscd data (old).
247 * Lock (rw_rdlock) a nscd data item for reading. The caller
248 * needs to call _nscd_rw_unlock() to unlock the data item
249 * when done using the data.
253 nscd_acc_data_t *data)
259 ret = _nscd_get(data);
267 (me, "data = %p, access->data = %p\n", data, access->data);
280 * Lock (rw_wrlock) a nscd data item for writing. The caller
281 * needs to call _nscd_rw_unlock() to unlock the data item
282 * when done using the data.
286 nscd_acc_data_t *data)
292 ret = _nscd_get(data);
300 (me, "data = %p, access->data = %p\n", data, access->data);
313 * Unlock (rw_unlock) a locked nscd data item.
317 nscd_acc_data_t *data)
322 if (data == NULL)
328 (me, "data = %p, access->data = %p\n",
329 data, access->data);
335 _nscd_release(data);
341 * Unlock (rw_unlock) a locked nscd data item but without release
343 * the data item is still being referenced.
347 nscd_acc_data_t *data)
351 if (data == NULL)
365 * Lock (mutex_lock) a nscd data item. The caller needs
366 * to call _nscd_mutex_unlock() to unlock the data item
367 * when done using the data.
371 nscd_acc_data_t *data)
377 ret = _nscd_get(data);
385 (me, "data = %p, access->data = %p\n", data, access->data);
399 * Unlock a locked nscd data item (that were locked by _nscd_mutex_lock)..
403 nscd_acc_data_t *data)
408 if (data == NULL)
414 (me, "data = %p, access->data = %p\n", data, access->data);
420 _nscd_release(data);
427 * with data.
431 nscd_acc_data_t *data, cond_t *cond)
436 if (data == NULL)
442 (me, "data = %p, access->data = %p\n", data, access->data);
456 * Perform a condition signal with the cond_t associated with 'data'.
460 nscd_acc_data_t *data)
465 if (data == NULL)
471 (me, "data = %p, access->data = %p\n", data, access->data);
483 * is the function to invoke to free the data
493 void (*data_free)(nscd_acc_data_t *data),
538 access->data = (char *)ptr + sizeof_access;
549 if (_nscd_add_int_addr(access->data, type,
555 return (access->data);
565 nscd_acc_data_t *data)
569 if (data == NULL)
576 _nscd_del_int_addr(access->data, access->seq_num);