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]

[libstdc++-v3 PATCH/RFA] Protect use of optional POSIX features


In a similar vein to my recent patch to gcc/gthr-posix.h, this protects
use of features from the optional Thread Priority Scheduling group in
the "pthread5" test.

Since this question came up wrt. gthr-posix.h, does the inclusion of
<unistd.h> need to be protected?  POSIX systems must provide this header
for feature testing, and since pthreads is a POSIX feature, seems reasonable
to assume that the header is there.

OK for mainline?

	* testsuite/thread/pthread5.cc: Include <unistd.h>.
	(main): Only use pthread_attr_setscope if
	_POSIX_THREAD_PRIORITY_SCHEDULING is defined.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>

Attachment: libstdc++-sched-patch
Description: Text document


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