Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 466312 | Differences between
and this patch

Collapse All | Expand All

(-)wxPython-src-2.9.4.0/src/unix/threadpsx.cpp.orig (-7 / +12 lines)
Lines 1047-1064 Link Here
1047
1047
1048
bool wxThread::SetConcurrency(size_t level)
1048
bool wxThread::SetConcurrency(size_t level)
1049
{
1049
{
1050
#ifdef HAVE_THR_SETCONCURRENCY
1050
#ifdef HAVE_PTHREAD_SET_CONCURRENCY
1051
    int rc = pthread_setconcurrency( level );
1052
#elif defined(HAVE_THR_SETCONCURRENCY)
1051
    int rc = thr_setconcurrency(level);
1053
    int rc = thr_setconcurrency(level);
1054
#else // !HAVE_THR_SETCONCURRENCY
1055
    // ok only for the default value
1056
    int rc = level == 0 ? 0 : -1;
1057
#endif // HAVE_THR_SETCONCURRENCY/!HAVE_THR_SETCONCURRENCY
1058
1052
    if ( rc != 0 )
1059
    if ( rc != 0 )
1053
    {
1060
    {
1054
        wxLogSysError(rc, _T("thr_setconcurrency() failed"));
1061
        wxLogSysError(rc, _("Failed to set thread concurrency level to %lu"),
1062
                      static_cast<unsigned long>(level));
1063
        return false;
1055
    }
1064
    }
1056
1065
1057
    return rc == 0;
1066
    return true;
1058
#else // !HAVE_THR_SETCONCURRENCY
1059
    // ok only for the default value
1060
    return level == 0;
1061
#endif // HAVE_THR_SETCONCURRENCY/!HAVE_THR_SETCONCURRENCY
1062
}
1067
}
1063
1068
1064
// -----------------------------------------------------------------------------
1069
// -----------------------------------------------------------------------------

Return to bug 466312