We now have sched_get_priority_*
OK landry@, jasper@
This commit is contained in:
parent
5ef9a9bf73
commit
a3ec4790b4
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.29 2010/11/04 12:05:25 dcoppa Exp $
|
||||
# $OpenBSD: Makefile,v 1.30 2010/11/08 10:58:05 dcoppa Exp $
|
||||
|
||||
SHARED_ONLY = Yes
|
||||
|
||||
@ -7,7 +7,7 @@ COMMENT = c++ cross-platform GUI toolkit
|
||||
V = 2.8.11
|
||||
DISTNAME = wxWidgets-${V}
|
||||
PKGNAME = wxWidgets-gtk2-${V}
|
||||
REVISION = 0
|
||||
REVISION = 1
|
||||
|
||||
SHARED_LIBS = wx_base 2.0 \
|
||||
wx_base_net 2.0 \
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-configure_in,v 1.5 2010/11/02 13:10:51 dcoppa Exp $
|
||||
$OpenBSD: patch-configure_in,v 1.6 2010/11/08 10:58:05 dcoppa Exp $
|
||||
--- configure.in.orig Thu Apr 15 11:02:51 2010
|
||||
+++ configure.in Tue Nov 2 10:21:20 2010
|
||||
@@ -3090,7 +3090,7 @@ if test "$wxUSE_LIBJPEG" != "no" ; then
|
||||
@ -78,25 +78,3 @@ $OpenBSD: patch-configure_in,v 1.5 2010/11/02 13:10:51 dcoppa Exp $
|
||||
else
|
||||
AC_MSG_WARN([Wide character support is unavailable])
|
||||
fi
|
||||
@@ -5609,8 +5595,13 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
|
||||
dnl (this one can be in either libpthread or libposix4 (under Solaris))
|
||||
dnl 3. pthread_attr_getschedparam and pthread_attr_setschedparam
|
||||
HAVE_PRIOR_FUNCS=0
|
||||
+ if test "$USE_OPENBSD" = 1; then
|
||||
AC_CHECK_FUNC(pthread_attr_getschedpolicy,
|
||||
[AC_CHECK_FUNC(pthread_attr_setschedparam,
|
||||
+ HAVE_PRIOR_FUNCS=1)])
|
||||
+ else
|
||||
+ AC_CHECK_FUNC(pthread_attr_getschedpolicy,
|
||||
+ [AC_CHECK_FUNC(pthread_attr_setschedparam,
|
||||
[AC_CHECK_FUNC(sched_get_priority_max,
|
||||
HAVE_PRIOR_FUNCS=1,
|
||||
[AC_CHECK_LIB([posix4], sched_get_priority_max,
|
||||
@@ -5622,6 +5613,7 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
|
||||
)]
|
||||
)]
|
||||
)
|
||||
+ fi
|
||||
|
||||
if test "$HAVE_PRIOR_FUNCS" = 1; then
|
||||
AC_DEFINE(HAVE_THREAD_PRIORITY_FUNCTIONS)
|
||||
|
@ -1,34 +0,0 @@
|
||||
$OpenBSD: patch-src_unix_threadpsx_cpp,v 1.1 2010/11/02 13:10:52 dcoppa Exp $
|
||||
--- src/unix/threadpsx.cpp.orig Thu Apr 15 11:04:33 2010
|
||||
+++ src/unix/threadpsx.cpp Thu Oct 28 07:27:58 2010
|
||||
@@ -1109,19 +1109,29 @@ wxThreadError wxThread::Create(unsigned int WXUNUSED_S
|
||||
wxLogError(_("Cannot retrieve thread scheduling policy."));
|
||||
}
|
||||
|
||||
-#ifdef __VMS__
|
||||
+#if defined(__VMS__) || defined (__OPENBSD__)
|
||||
/* the pthread.h contains too many spaces. This is a work-around */
|
||||
+ /* on OpenBSD, priority min/max are declared in libpthread private hdr */
|
||||
# undef sched_get_priority_max
|
||||
#undef sched_get_priority_min
|
||||
+#endif
|
||||
+#ifdef __VMS__
|
||||
#define sched_get_priority_max(_pol_) \
|
||||
(_pol_ == SCHED_OTHER ? PRI_FG_MAX_NP : PRI_FIFO_MAX)
|
||||
#define sched_get_priority_min(_pol_) \
|
||||
(_pol_ == SCHED_OTHER ? PRI_FG_MIN_NP : PRI_FIFO_MIN)
|
||||
#endif
|
||||
|
||||
+#ifdef __OPENBSD__
|
||||
+// on OpenBSD, priority min/max are declared in libpthread private hdr
|
||||
+ int max_prio = 31,
|
||||
+ min_prio = 0,
|
||||
+ prio = m_internal->GetPriority();
|
||||
+#else
|
||||
int max_prio = sched_get_priority_max(policy),
|
||||
min_prio = sched_get_priority_min(policy),
|
||||
prio = m_internal->GetPriority();
|
||||
+#endif
|
||||
|
||||
if ( min_prio == -1 || max_prio == -1 )
|
||||
{
|
Loading…
x
Reference in New Issue
Block a user