|
Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
|
#include <memory>#include <utility>#include <cassert>#include <cstddef>#include <cstdio>#include <cstring>#include <rw_driver.h>#include <rw_thread.h>
Go to the source code of this file.
Data Structures | |
| struct | thr_args< intT > |
Macros | |
| #define | MAX_THREADS 0 |
Functions | |
| template<class T > | |
| std::pair< T *, std::ptrdiff_t > | test_get_buffer (thr_args *args, T *, unsigned nobjs) |
| template<class T > | |
| void | test_return_buffer (thr_args *args, std::pair< T *, std::ptrdiff_t > &buf) |
| void * | thr_func (void *arg) |
| int | main (int argc, char *argv[]) |
Variables | |
| unsigned | rw_opt_nthreads = 4 <= MAX_THREADS ? 4 : MAX_THREADS |
| unsigned | rw_opt_nloops = 1024 * 1024 |
| #define MAX_THREADS 0 |
20.temp.buffer.mt.cpp - test exercising the thread safety of std::get_temporary_buffer() and std::return_temporary_buffer()
$Id$
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-2008 Rogue Wave Software, Inc.
Definition at line 45 of file 20.temp.buffer.mt.cpp.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 240 of file 20.temp.buffer.mt.cpp.
| std::pair< T *, std::ptrdiff_t > test_get_buffer | ( | thr_args * | args, |
| T * | , | ||
| unsigned | nobjs | ||
| ) |
Definition at line 66 of file 20.temp.buffer.mt.cpp.
| void test_return_buffer | ( | thr_args * | args, |
| std::pair< T *, std::ptrdiff_t > & | buf | ||
| ) |
Definition at line 93 of file 20.temp.buffer.mt.cpp.
| void * thr_func | ( | void * | arg | ) |
Definition at line 125 of file 20.temp.buffer.mt.cpp.
| unsigned rw_opt_nloops = 1024 * 1024 |
Definition at line 51 of file 20.temp.buffer.mt.cpp.
| unsigned rw_opt_nthreads = 4 <= MAX_THREADS ? 4 : MAX_THREADS |
Definition at line 50 of file 20.temp.buffer.mt.cpp.