* [PATCH] More POSIX feature tests
@ 2002-10-30 0:21 Momchil Velikov
0 siblings, 0 replies; only message in thread
From: Momchil Velikov @ 2002-10-30 0:21 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 134 bytes --]
For the same reasons as here:
http://gcc.gnu.org/ml/gcc-patches/2002-10/msg01666.html
Bootstrapped on pentium2-pc-netbsdelf.
~velco
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: x --]
[-- Type: text/x-patch; name="x", Size: 1496 bytes --]
Index: libjava/posix-threads.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/posix-threads.cc,v
retrieving revision 1.30.8.2
diff -u -d -p -r1.30.8.2 posix-threads.cc
--- libjava/posix-threads.cc 21 Mar 2002 00:34:57 -0000 1.30.8.2
+++ libjava/posix-threads.cc 29 Oct 2002 21:59:53 -0000
@@ -318,6 +318,7 @@ _Jv_ThreadDestroyData (_Jv_Thread_t *dat
void
_Jv_ThreadSetPriority (_Jv_Thread_t *data, jint prio)
{
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
if (data->flags & FLAG_START)
{
struct sched_param param;
@@ -325,6 +326,7 @@ _Jv_ThreadSetPriority (_Jv_Thread_t *dat
param.sched_priority = prio;
pthread_setschedparam (data->thread, SCHED_RR, ¶m);
}
+#endif
}
void
@@ -390,7 +392,9 @@ void
_Jv_ThreadStart (java::lang::Thread *thread, _Jv_Thread_t *data,
_Jv_ThreadStartFunc *meth)
{
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
struct sched_param param;
+#endif
pthread_attr_t attr;
struct starter *info;
@@ -398,10 +402,11 @@ _Jv_ThreadStart (java::lang::Thread *thr
return;
data->flags |= FLAG_START;
- param.sched_priority = thread->getPriority();
-
pthread_attr_init (&attr);
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+ param.sched_priority = thread->getPriority();
pthread_attr_setschedparam (&attr, ¶m);
+#endif
pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
info = (struct starter *) _Jv_AllocBytes (sizeof (struct starter));
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-10-30 8:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-30 0:21 [PATCH] More POSIX feature tests Momchil Velikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).