This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[libjava PATCH] Conditionalize use of thread priority scheduling


Thread priority scheduling is an option in POSIX.  The canonical way
to test for this feature is to include <unistd.h> and test for the
_POSIX_THREAD_PRIORITY_SCHEDULING macro.  The libstdc++-v3 testsuite
already does this, in fact.

This fixes building libjava on i386-unknown-netbsdelf2.0 (threads
enabled).  OK for mainline and 3.3 branch?

	* posix-threads.cc: Include <unistd.h> if HAVE_UNISTD_H is defined.
	(_Jv_ThreadSetPriority): Test for _POSIX_THREAD_PRIORITY_SCHEDULING.

-- 
        -- Jason R. Thorpe <thorpej at wasabisystems dot com>

Attachment: libjava-pthread-patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]