Re: Clarification for interface specification "C11 threads.h"

Discussion in 'C++' started by Markus Elfring, Oct 12, 2012.

  1. >> I am curious if you will get feedback by standardisation committee members
    >> for your descriptions.
    >> http://p99.gforge.inria.fr/defects-and-improvements/DR-underspecified-thread-functions.html
    >>
    >> Did you forward any of them to an "official" communication channel?

    >
    > I am not sure what channel that would be, the ISO committees
    > don't seem to be very open to the outside world.


    Do you get also any useful information by Derek M. Jones occasionally? ;-)
    http://www.knosof.co.uk/cbook/


    > Generally, if you look at the text for free that you are citing,
    > and compare it with the text about the threads in C11, you'll notice
    > a difference in quality. C11 certainly lacked some iterations
    > of discussion and error correction before it went into the standard.
    > In particular, a better coordination with the POSIX committee
    > would have been in order concerning threads.


    I see also another update candidate if you compare descriptions for the
    functions "pthread_cond_wait" and "cnd_wait".

    http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_cond_wait.html :
    "...
    When using condition variables there is always a Boolean predicate involving
    shared variables associated with each condition wait that is true if the thread
    should proceed. Spurious wakeups from the pthread_cond_timedwait() or
    pthread_cond_wait() functions may occur.
    Since the return from pthread_cond_timedwait() or pthread_cond_wait() does not
    imply anything about the value of this predicate, the predicate should be
    re-evaluated upon such return.
    ...."

    How do you think about further clarification for the handling of "predicates"
    and "spurious wakeups" by the current standard specification for the C
    programming language?
    Do you need not to care for them eventually because they are not mentioned in a
    corresponding draft document?
    http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf

    Regards,
    Markus
    Markus Elfring, Oct 12, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wildepiet
    Replies:
    0
    Views:
    1,848
    Wildepiet
    Jun 14, 2004
  2. cyberco
    Replies:
    8
    Views:
    478
    cyberco
    Feb 25, 2006
  3. Replies:
    2
    Views:
    477
    sloan
    Feb 2, 2008
  4. Dzikus
    Replies:
    0
    Views:
    293
    Dzikus
    Jun 30, 2008
  5. John Tsiombikas

    Trivial C11 threads.h wrapper (public domain)

    John Tsiombikas, Sep 27, 2012, in forum: C Programming
    Replies:
    37
    Views:
    1,958
    Shao Miller
    Dec 15, 2012
Loading...

Share This Page