Print this page
11586 NAME field in man pages should match what's installed

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man3c/tss.3c
          +++ new/usr/src/man/man3c/tss.3c
↓ open down ↓ 3 lines elided ↑ open up ↑
   4    4  .\" You may only use this file in accordance with the terms of version
   5    5  .\" 1.0 of the CDDL.
   6    6  .\"
   7    7  .\" A full copy of the text of the CDDL should have accompanied this
   8    8  .\" source.  A copy of the CDDL is also available via the Internet at
   9    9  .\" http://www.illumos.org/license/CDDL.
  10   10  .\"
  11   11  .\"
  12   12  .\" Copyright 2016 Joyent, Inc.
  13   13  .\"
  14      -.Dd "Jan 11, 2015"
       14 +.Dd "Aug 20, 2019"
  15   15  .Dt TSS 3C
  16   16  .Os
  17   17  .Sh NAME
  18   18  .Nm tss ,
  19   19  .Nm tss_create ,
  20      -.Nm tss_destroy ,
       20 +.Nm tss_delete ,
  21   21  .Nm tss_get ,
  22   22  .Nm tss_set
  23   23  .Nd thread-specific storage
  24   24  .Sh SYNOPSIS
  25   25  .In threads.h
  26   26  .Vt "typedef void (*tss_dtor_t)(void *);"
  27   27  .Ft int
  28   28  .Fo tss_create
  29   29  .Fa "tss_t *key"
  30   30  .Fa "tss_dtor_t dtor"
↓ open down ↓ 9 lines elided ↑ open up ↑
  40   40  .Ft int
  41   41  .Fo tss_set
  42   42  .Fa "tss_t key"
  43   43  .Fa "void *val"
  44   44  .Fc
  45   45  .Sh DESCRIPTION
  46   46  The
  47   47  .Sy tss
  48   48  family of functions create, get, set, and destroy thread-specific
  49   49  storage.
  50      -.Ss Creating and Destorying Thread-Specific Storage
       50 +.Ss Creating and Destroying Thread-Specific Storage
  51   51  The
  52   52  .Fn tss_create
  53   53  function creates a new thread-specific data key.
  54   54  The key space is opaque and global to all threads in the process.
  55   55  Each thread has its own value-space which can be manipulated with the
  56   56  .Fn tss_get
  57   57  and
  58   58  .Fn tss_set
  59   59  functions.
  60   60  A given key persists until
  61      -.Fn tss_destroy
       61 +.Fn tss_delete
  62   62  is called.
  63   63  .Pp
  64   64  When a key is created, the value
  65   65  .Dv NULL
  66   66  is associated with all current threads.
  67   67  When a thread is created, the value
  68   68  .Dv NULL
  69   69  is assigned as the value for the entire key-space.
  70   70  .Pp
  71   71  A key may optionally be created with a destructor function
↓ open down ↓ 9 lines elided ↑ open up ↑
  81   81  .Pp
  82   82  The
  83   83  .Fn tss_delete
  84   84  function deletes the key identify by
  85   85  .Fa key
  86   86  from the global name-space.
  87   87  When a key is deleted, no registered destructor is called, it is up to the
  88   88  calling program to free any storage that was associated with
  89   89  .Fa key
  90   90  across all threads.
  91      -Because of this propety, it is legal to call
       91 +Because of this property, it is legal to call
  92   92  .Fn tss_delete
  93   93  from inside a destructor.
  94      -Any destructors that had been assocaited with
       94 +Any destructors that had been associated with
  95   95  .Fa key
  96   96  will no longer be called when a thread terminates.
  97   97  .Ss Obtaining Values
  98   98  The
  99   99  .Fn tss_get
 100  100  function may be used to obtain the value associated with
 101  101  .Fa key
 102  102  for the calling thread.
 103  103  Note that if the calling thread has never set a value, then it will receive the
 104  104  default value,
 105  105  .Dv NULL .
 106  106  .Fn tss_get
 107  107  may be called from a tss destructor.
 108  108  .Ss Setting Values
 109  109  The
 110  110  .Fn tss_set
 111  111  function sets the value of the key
 112  112  .Fa key
 113      -for the callling thread to
      113 +for the calling thread to
 114  114  .Fa value ,
 115  115  which may be obtained by subsequent calls to
 116  116  .Fa tss_get .
 117  117  To remove a value for a specific thread, one may pass
 118  118  .Dv NULL
 119  119  in as
 120  120  .Fa value .
 121  121  Changing the value of a key with
 122  122  .Fn tss_set
 123  123  does not cause any destructors to be invoked.
↓ open down ↓ 33 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX