]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/21_strings/basic_string/pthread4.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 21_strings / basic_string / pthread4.cc
index 146d8c7a59401c199835d083db881ef0e93996a1..1cc87ca9ffdbd7888bb21364cfcfe4c0b9e3870d 100644 (file)
@@ -2,13 +2,12 @@
 // Adapted from http://gcc.gnu.org/ml/gcc-bugs/2002-01/msg00679.html
 // which was adapted from pthread1.cc by Mike Lu <MLu@dynamicsoft.com>
 //
-// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
-// Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 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)
+// Free Software Foundation; either version 3, or (at your option)
 // any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
 
-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
-// { dg-options "-pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
-// { dg-options "-pthreads" { target *-*-solaris* } }
+// { dg-do run }
+// { dg-options "-pthread"  }
+// { dg-require-effective-target pthread }
 
 #include <string>
 #include <list>
@@ -96,12 +94,12 @@ main (void)
 #endif
 
   pthread_t prod;
-  pthread_create (&prod, NULL, produce, NULL);
+  pthread_create (&prod, 0, produce, 0);
   pthread_t cons;
-  pthread_create (&cons, NULL, consume, NULL);
+  pthread_create (&cons, 0, consume, 0);
 
-  pthread_join (prod, NULL);
-  pthread_join (cons, NULL);
+  pthread_join (prod, 0);
+  pthread_join (cons, 0);
 
   return 0;
 }