Print this page
12309 errors in section 9e of the manual

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man3c/cond_init.3c.man.txt
          +++ new/usr/src/man/man3c/cond_init.3c.man.txt
↓ open down ↓ 54 lines elided ↑ open up ↑
  55   55         A condition variable must not be simultaneously initialized by multiple
  56   56         threads or re-initialized while in use by other threads.
  57   57  
  58   58  
  59   59         Attributes of condition variables can be set to the default or
  60   60         customized at initialization.
  61   61  
  62   62  
  63   63         The cond_init() function initializes the condition variable pointed to
  64   64         by cvp. A condition variable can have several different types of
  65      -       behavior, specified by type. No current type uses  arg although a
  66      -       future type may specify additional behavior parameters with arg. The
  67      -       type argument c take one of the following values:
       65 +       behavior, specified by type. No current type uses arg although a future
       66 +       type may specify additional behavior parameters with arg. The type
       67 +       argument c take one of the following values:
  68   68  
  69   69         USYNC_THREAD
  70      -                        The condition variable can synchronize  threads only
  71      -                        in this process. This is the default.
       70 +                        The condition variable can synchronize threads only in
       71 +                        this process. This is the default.
  72   72  
  73   73  
  74   74         USYNC_PROCESS
  75   75                          The condition variable can synchronize threads in this
  76   76                          process and other processes. Only one process should
  77   77                          initialize the condition variable. The object
  78   78                          initialized with this attribute must be allocated in
  79   79                          memory shared between processes, either in System V
  80   80                          shared memory (see shmop(2)) or in memory mapped to a
  81   81                          file (see mmap(2)). It is illegal to initialize the
↓ open down ↓ 41 lines elided ↑ open up ↑
 123  123         The condition wait interface allows a thread to wait for a condition
 124  124         and atomically release the associated mutex that it needs to hold to
 125  125         check the condition. The thread waits for another thread to make the
 126  126         condition true and that thread's resulting call to signal and wakeup
 127  127         the waiting thread.
 128  128  
 129  129  
 130  130         The cond_wait() function atomically releases the mutex pointed to by mp
 131  131         and causes the calling thread to block on the condition variable
 132  132         pointed to by cvp. The blocked thread may be awakened by cond_signal(),
 133      -       cond_broadcast(), or when interrupted by delivery of a  UNIX signal or
 134      -       a fork().
      133 +       cond_broadcast(), or when interrupted by delivery of a UNIX signal or a
      134 +       fork().
 135  135  
 136  136  
 137  137         The cond_wait(), cond_timedwait(), and cond_reltimedwait() functions
 138  138         always return with the mutex locked and owned by the calling thread
 139  139         even when returning an error, except when the mutex has the LOCK_ROBUST
 140  140         attribute and has been left irrecoverable by the mutex's last owner.
 141  141         The cond_wait(), cond_timedwait(), and cond_reltimedwait() functions
 142  142         return the appropriate error value if they fail to internally reacquire
 143  143         the mutex.
 144  144  
↓ open down ↓ 59 lines elided ↑ open up ↑
 204  204         return the following error values.  For complete information, see the
 205  205         description of the mutex_lock() function on the mutex_init(3C) manual
 206  206         page.
 207  207  
 208  208         ENOTRECOVERABLE
 209  209                            The mutex was protecting the state that has now been
 210  210                            left irrecoverable. The mutex has not been acquired.
 211  211  
 212  212  
 213  213         EOWNERDEAD
 214      -                          The last owner of the mutex died while  holding the
      214 +                          The last owner of the mutex died while holding the
 215  215                            mutex, possibly leaving the state it was protecting
 216  216                            inconsistent. The mutex is now owned by the caller.
 217  217  
 218  218  
 219  219  
 220  220         These functions may fail if:
 221  221  
 222  222         EFAULT
 223  223                   The cond, attr, cvp, arg, abstime, or mutex argument points
 224  224                   to an illegal address.
↓ open down ↓ 2 lines elided ↑ open up ↑
 227  227         EINVAL
 228  228                   Invalid argument. For cond_init(), type is not a recognized
 229  229                   type.  For cond_timedwait(), the number of nanoseconds is
 230  230                   greater than or equal to 1,000,000,000.
 231  231  
 232  232  
 233  233  EXAMPLES
 234  234         Example 1 Use cond_wait() in a loop to test some condition.
 235  235  
 236  236  
 237      -       The cond_wait() functin is normally used in a loop testing some
      237 +       The cond_wait() function is normally used in a loop testing some
 238  238         condition, as follows:
 239  239  
 240  240  
 241  241           (void) mutex_lock(mp);
 242  242           while (cond == FALSE) {
 243  243                (void) cond_wait(cvp, mp);
 244  244           }
 245  245           (void) mutex_unlock(mp);
 246  246  
 247  247  
↓ open down ↓ 76 lines elided ↑ open up ↑
 324  324         cond_wait(), except that the calling thread will not wait for the
 325  325         condition to become true past the absolute time specified by abstime or
 326  326         the relative time specified by reltime. Note that cond_timedwait() or
 327  327         cond_reltimedwait() might continue to block as it trys to reacquire the
 328  328         mutex pointed to by mp, which may be locked by another thread. If
 329  329         either cond_timedwait() or cond_reltimedwait() returns because of a
 330  330         timeout, it returns the error value ETIME.
 331  331  
 332  332  
 333  333  
 334      -                                 June 5, 2007                    COND_INIT(3C)
      334 +                               February 15, 2020                 COND_INIT(3C)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX