forked from boostorg/smart_ptr
Split sp_counted_base into no threads (nt), win32 lock-free (w32) and pthreads (pt)
[SVN r27729]
This commit is contained in:
@@ -143,19 +143,11 @@ void test(boost::shared_ptr<int> const & pi)
|
||||
|
||||
int const m = 16; // threads
|
||||
|
||||
#if defined(BOOST_LWM_USE_CRITICAL_SECTION)
|
||||
char const * implementation = "critical section";
|
||||
#elif defined(BOOST_LWM_USE_PTHREADS)
|
||||
char const * implementation = "pthread_mutex";
|
||||
#else
|
||||
char const * implementation = "spinlock";
|
||||
#endif
|
||||
|
||||
int main()
|
||||
{
|
||||
using namespace std; // printf, clock_t, clock
|
||||
|
||||
printf("%s: %s, %d threads, %d iterations: ", title, implementation, m, n);
|
||||
printf("%s: %d threads, %d iterations: ", title, m, n);
|
||||
|
||||
boost::shared_ptr<int> pi(new int(42));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user