Qt 4.4 QtConcurrent and libthread_xu

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Wed May 7 16:27:14 PDT 2008

Matthew Dillon wrote:
    That said, from an administrative point of view I want to have maximum
    compatibility between libthread_xu and libpthread, because we aren't
    really in the business of policing other people's work.
    So I am willing to commit the change, even if the standard doesn't allow
The standard says:

int pthread_mutex_lock(pthread_mutex_t *mutex);
int pthread_mutex_trylock(pthread_mutex_t *mutex);
int pthread_mutex_unlock(pthread_mutex_t *mutex);
Note that none of the parameters has the modifier "restricted".  That 
means that they may be NULL.

The pthread_mutex_lock(), pthread_mutex_trylock(), and 
pthread_mutex_unlock() functions may fail if:

    The value specified by mutex does not refer to an initialized mutex 

Now, of course we cannot detect every single value that might not refer to 
an initialized mutex object (unless we caught exceptions, etc.), but 
returning EINVAL on a NULL pointer for sure isn't the wrong thing to do.

Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \

More information about the Bugs mailing list