[RFA] AIX thread support
David Edelsohn
dje@watson.ibm.com
Wed Oct 11 20:54:00 GMT 2000
* acinclude.m4 (GLIBCPP_CHECK_OS): Enable threads for AIX 4.3
and above.
(GLIBCPP_ENABLE_THREADS): Allow 'aix' threads and use thread-aix.h
header.
* config/threads-aix.h: New file.
Index: acinclude.m4
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/acinclude.m4,v
retrieving revision 1.65
diff -c -p -r1.65 acinclude.m4
*** acinclude.m4 2000/10/11 17:08:35 1.65
--- acinclude.m4 2000/10/12 03:49:52
*************** AC_DEFUN(GLIBCPP_CHECK_OS, [
*** 734,739 ****
--- 734,743 ----
# Currently unused, but could be useful.
# OS_FLAGS=
case "${target_os}" in
+ aix4.[[3456789]]* | aix[[56789]]*)
+ os_include_dir="config/os/aix"
+ enable_threads='aix'
+ ;;
aix*)
os_include_dir="config/os/aix"
;;
*************** AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
*** 1347,1353 ****
target_thread_file=''
;;
xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
! xsolaris | xwin32 | xdce | xvxworks)
target_thread_file=$enable_threads_flag
;;
*)
--- 1351,1357 ----
target_thread_file=''
;;
xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
! xsolaris | xwin32 | xdce | xvxworks | xaix)
target_thread_file=$enable_threads_flag
;;
*)
*************** AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
*** 1361,1366 ****
--- 1365,1373 ----
case "$target_thread_file" in
no | none | single)
THREADH=threads-no.h
+ ;;
+ aix)
+ THREADH=threads-aix.h
;;
posix | pthreads)
THREADH=threads-posix.h
===== config/threads-aix.h =====
// thread support (aix case) -*- C++ -*-
// Copyright (C) 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
// threads-aix.h - Defines for using AIX pthreads.
#ifndef _CPP_THREADS_AIX
#define _CPP_THREADS_AIX
#ifdef _THREAD_SAFE
#include "config/threads-posix.h"
#else
#include "config/threads-no.h"
#endif
#endif // _CPP_THREADS_AIX
More information about the Libstdc++
mailing list