product.asp

来自「Pthread lib库完整说明文档」· ASP 代码 · 共 548 行 · 第 1/5 页

ASP
548 行
字号
<hr>
  <p>Page 332. In the header line for the <tt><b>pthread_mutexattr_getprotocol</b></tt> 
    function at the bottom of the page, two separate POSIX option symbols are 
    documented within square brackets. The two symbols got squashed together into 
    one text string, as "[_POSIX_THREAD_PRIO_INHERIT_POSIX_THREAD_PRIO_PROTECT]". 
    They need to be separated, like this: 
  <blockquote>
    <pre><tt>
<b>pthread_mutexattr_getprotocol...</b> [_POSIX_THREAD_PRIO_INHERIT _POSIX_THREAD_PRIO_PROTECT]
</tt></pre>
  </blockquote>
  <p>Page 333. The <tt>pthread_mutexattr_setprotocol</tt> function has the same 
    problem with the option names being squashed together. The header line should 
    be: 
  <blockquote>
    <pre><tt>
<b>pthread_mutexattr_setprotocol...</b> [_POSIX_THREAD_PRIO_INHERIT _POSIX_THREAD_PRIO_PROTECT]
</tt></pre>
  </blockquote>
  <hr>
  <p>On page 332, in the reference section for <tt>pthread_mutex_setprioceiling</tt>, 
    the prototype uses the name <tt>pthread_mutex_getprioceiling</tt>. The prototype 
    should be: 
  <blockquote><pre><tt> int pthread_mutex_setprioiceiling ( pthread_mutex_t *mutex, 
    int prioceiling, int *old_ceiling); </tt></blockquote>
  <tt></pre></tt> 
  <hr>
  <p>Page 338. The prototype for the function <tt>getchar_unlocked</tt> defines 
    <tt>getc_unlocked</tt>. The correct prototype should be: 
  <blockquote><pre><tt>
        int getchar_unlocked (void);
</tt></pre></blockquote>
<hr>
<p>Page 348. The prototype in the shaded area for the function
<tt>pthread_getconcurrency</tt> is not complete; the argument list
should be specified as <tt>void</tt>, as follows:
<blockquote><pre><tt>
int pthread_getconcurrency (void);
</tt></pre></blockquote>
<hr>
<p>Pages 356-361. So far, I've avoided correcting my descriptions of the
preliminary UNIX 98 functions, despite changes in the final version.
Every time I look at it, (especially as I've yet to find time to think 
seriously about a revised edition), I get more tempted to take a crack 
at making simple changes to update the descriptions. I'm going to give 
it a try. This is going to slightly change page flows, and it affects
the index. The effect doesn't seem substantial, but even if
Addison-Wesley doesn't want to deal with this in a reprint, it's worth 
having the information in the errata.
<hr size=1 width="50%" align=center>
<p>Page 356. The proposed 1003.1j barrier functions listed here use
<tt>barrier_</tt> prefixes, but the final version reverted to the
"standard" Pthread <tt>pthread_</tt> prefixes. This is easy to fix,
although the list will continue into page 357. (Which may be OK since
I'll be deleting some lines there.)
<blockquote><pre><tt>
int pthread_barrierattr_init (
    pthread_barrierattr_t *attr);
int pthread_barrierattr_destroy (
    pthread_barrierattr_t *attr);
int pthread_barrierattr_getpshared (
    const pthread_barrierattr_t *attr, int *pshared);
int pthread_barrierattr_setpshared (
    pthread_barrierattr_t *attr, int pshared);
int pthread_barrier_init (pthread_barrier_t *barrier,
    const pthread_barrierattr_t *attr, int count);
int pthread_barrier_destroy (
    pthread_barrier_t *barrier);
int pthread_barrier_wait (pthread_barrier_t *barrier);
</tt></pre></blockquote>
<hr size=1 width="50%" align=center>
<p>Page 357. The proposed 1003.1j read-write lock functions used
<tt>rwlock_</tt> prefixes, but the final version reverted to the
"standard" Pthread <tt>pthread_</tt> prefixes.
<blockquote><pre><tt>
int pthread_rwlockattr_init (
    pthread_rwlockattr_t *attr);
int pthread_rwlockattr_destroy (
    pthread_rwlockattr_t *attr);
int pthread_rwlockattr_getpshared (
    const pthread_rwlockattr_t *attr, int *pshared);
int pthread_rwlockattr_setpshared (
    pthread_rwlockattr_t *attr, int pshared);
int pthread_rwlock_init (pthread_rwlock_t *rwl,
    const pthread_rwlockattr_t *attr);
int pthread_rwlock_destroy (pthread_rwlock_t *rwl);
int pthread_rwlock_rdlock (pthread_rwlock_t *rwl);
int pthread_rwlock_timedrdlock (pthread_rwlock_t *rwl,
    const struct timespec *timeout);
int pthread_rwlock_tryrdlock (pthread_rwlock_t *rwl);
int pthread_rwlock_unlock (pthread_rwlock_t *rwl);
int pthread_rwlock_wrlock (pthread_rwlock_t *rwl);
int pthread_rwlock_timedwrlock (pthread_rwlock_t *rwl,
    const struct timespec *timeout);
int pthread_rwlock_trywrlock (pthread_rwlock_t *rwl);
int pthread_rwlock_wrlock (pthread_rwlock_t *rwl);
</tt></pre></blockquote>
<hr size=1 width="50%" align=center>
<p>Also on page 357, he proposed 1003.1j spinlock functions were
divided into "process private" versions with <tt>spin_</tt> prefixes
and "process shared" versions with <tt>pthread_</tt> prefixes. These
were consolidated into one set of <tt>pthread_</tt> interfaces using
an integer <tt>pshared</tt> argument on initialization, as for
<tt>sem_init</tt>. The final list of spinlock functions is:
<blockquote><pre><tt>
int pthread_spin_init (pthread_spinlock_t *lock,
    int pshared);
int pthread_spin_destroy (pthread_s

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?