MCPcopy Create free account
hub / github.com/F-Stack/f-stack / tsd_create

Function tsd_create

freebsd/contrib/openzfs/module/os/linux/spl/spl-tsd.c:567–575  ·  view source on GitHub ↗

* tsd_create - create thread specific data key * @keyp: lookup key address * @dtor: destructor called during tsd_destroy() or tsd_exit() * * Provided key must be set to 0 or it assumed to be already in use. * The dtor is allowed to be NULL in which case no additional cleanup * for the data is performed during tsd_destroy() or tsd_exit(). * * Caller must prevent racing tsd_set() or tsd_get(

Source from the content-addressed store, hash-verified

565 * safe from racing tsd_create(), tsd_destroy(), and tsd_exit().
566 */
567void
568tsd_create(uint_t *keyp, dtor_func_t dtor)
569{
570 ASSERT3P(keyp, !=, NULL);
571 if (*keyp)
572 return;
573
574 (void) tsd_hash_add_key(tsd_hash_table, keyp, dtor);
575}
576EXPORT_SYMBOL(tsd_create);
577
578/*

Callers 5

system_taskq_initFunction · 0.85
zfs__initFunction · 0.85
spl_taskq_initFunction · 0.85
zfs_kmod_initFunction · 0.85
kernel_initFunction · 0.85

Calls 1

tsd_hash_add_keyFunction · 0.85

Tested by

no test coverage detected