stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r548121 - /incubator/stdcxx/trunk/tests/include/rw_thread.h
Date Sun, 17 Jun 2007 21:57:14 GMT
Author: sebor
Date: Sun Jun 17 14:57:13 2007
New Revision: 548121

URL: http://svn.apache.org/viewvc?view=rev&rev=548121
Log:
2007-06-17  Martin Sebor  <sebor@roguewave.com>

	* rw_thread.h: Added comments.

Modified:
    incubator/stdcxx/trunk/tests/include/rw_thread.h

Modified: incubator/stdcxx/trunk/tests/include/rw_thread.h
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/include/rw_thread.h?view=diff&rev=548121&r1=548120&r2=548121
==============================================================================
--- incubator/stdcxx/trunk/tests/include/rw_thread.h (original)
+++ incubator/stdcxx/trunk/tests/include/rw_thread.h Sun Jun 17 14:57:13 2007
@@ -6,16 +6,23 @@
  *
  ************************************************************************
  *
- * Copyright (c) 1994-2005 Quovadx,  Inc., acting through its  Rogue Wave
- * Software division. Licensed under the Apache License, Version 2.0 (the
- * "License");  you may  not use this file except  in compliance with the
- * License.    You    may   obtain   a   copy   of    the   License    at
- * http://www.apache.org/licenses/LICENSE-2.0.    Unless   required    by
- * applicable law  or agreed to  in writing,  software  distributed under
- * the License is distributed on an "AS IS" BASIS,  WITHOUT WARRANTIES OR
- * CONDITIONS OF  ANY KIND, either  express or implied.  See  the License
- * for the specific language governing permissions  and limitations under
- * the License.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 2005-2006 Rogue Wave Software.
  * 
  **************************************************************************/
 
@@ -31,12 +38,13 @@
 
 struct rw_thread_t
 {
-    long  threadno;
-    long  id;
-    void* handle;
+    long  threadno;   // 0-based unique thread number
+    long  id;         // thread id
+    void* handle;     // thread handle
 };
 
 
+// same as POSIX pthread_create()
 _TEST_EXPORT int
 rw_thread_create (rw_thread_t*,
                   rw_thread_attr_t*,
@@ -44,15 +52,24 @@
                   void*);
 
 
+// same as POSIX pthread_join()
 _TEST_EXPORT int
 rw_thread_join (rw_thread_t, void**);
 
 
+// create a pool of nthreads, passing each a successive element
+// of argarray as argument (if non-null) and filling the tidarray
+// array with their id's; if tidarray is null, waits for all
+// threads to join and fills the aragarray with the result
+// returned from each thread
+// returns 0 on success, or a non-zero value indicating the thread
+// number that failed to create on error
 _TEST_EXPORT int
-rw_thread_pool (rw_thread_t*, _RWSTD_SIZE_T,
-                rw_thread_attr_t*,
-                void* (*)(void*),
-                void**);
+rw_thread_pool (rw_thread_t*      /* tidarray */,
+                _RWSTD_SIZE_T     /* nthreads */,
+                rw_thread_attr_t* /* attr */,
+                void* (*)(void*)  /* thr_proc */,
+                void**            /* argarray */);
 
 }   // extern "C"
 



Mime
View raw message