diff options
author | Jason Thorpe <thorpej@wasabisystems.com> | 2003-03-02 01:24:40 +0000 |
---|---|---|
committer | Jason Thorpe <thorpej@gcc.gnu.org> | 2003-03-02 01:24:40 +0000 |
commit | 66c4e25802794e3c3c92e3cfdafe3ee8bd3b005c (patch) | |
tree | bf4affbe7e622a621a9117fd3016958831b7d322 /libjava | |
parent | 3ccd3d704112889a79a0ccdcfc51bfcc55019827 (diff) | |
download | gcc-66c4e25802794e3c3c92e3cfdafe3ee8bd3b005c.zip gcc-66c4e25802794e3c3c92e3cfdafe3ee8bd3b005c.tar.gz gcc-66c4e25802794e3c3c92e3cfdafe3ee8bd3b005c.tar.bz2 |
posix-threads.cc: Include <unistd.h> if HAVE_UNISTD_H is defined.
* posix-threads.cc: Include <unistd.h> if HAVE_UNISTD_H is defined.
(_Jv_ThreadSetPriority): Test for _POSIX_THREAD_PRIORITY_SCHEDULING.
From-SVN: r63647
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/posix-threads.cc | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 25ee6f4..1cefce0 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2003-03-01 Jason Thorpe <thorpej@wasabisystems.com> + + * posix-threads.cc: Include <unistd.h> if HAVE_UNISTD_H is defined. + (_Jv_ThreadSetPriority): Test for _POSIX_THREAD_PRIORITY_SCHEDULING. + 2003-03-01 Ranjit Mathew <rmathew@hotmail.com> * java/io/File.java (normalizePath): Remove trailing separator diff --git a/libjava/posix-threads.cc b/libjava/posix-threads.cc index e92348b..656f483 100644 --- a/libjava/posix-threads.cc +++ b/libjava/posix-threads.cc @@ -24,6 +24,9 @@ details. */ #include <signal.h> #include <errno.h> #include <limits.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> // To test for _POSIX_THREAD_PRIORITY_SCHEDULING +#endif #include <gcj/cni.h> #include <jvm.h> @@ -318,6 +321,7 @@ _Jv_ThreadDestroyData (_Jv_Thread_t *data) 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 +329,7 @@ _Jv_ThreadSetPriority (_Jv_Thread_t *data, jint prio) param.sched_priority = prio; pthread_setschedparam (data->thread, SCHED_RR, ¶m); } +#endif } void |