Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78544 - in trunk: boost/context/detail libs/context/doc libs/context/example libs/context/performance libs/context/src libs/context/test
From: oliver.kowalke_at_[hidden]
Date: 2012-05-22 16:02:06


Author: olli
Date: 2012-05-22 16:02:04 EDT (Tue, 22 May 2012)
New Revision: 78544
URL: http://svn.boost.org/trac/boost/changeset/78544

Log:
context: tab cleanup

Text files modified:
   trunk/boost/context/detail/fcontext_arm.hpp | 2 +-
   trunk/boost/context/detail/fcontext_i386.hpp | 6 +++---
   trunk/boost/context/detail/fcontext_i386_win.hpp | 2 +-
   trunk/boost/context/detail/fcontext_mips.hpp | 2 +-
   trunk/boost/context/detail/fcontext_ppc.hpp | 2 +-
   trunk/boost/context/detail/fcontext_x86_64.hpp | 2 +-
   trunk/boost/context/detail/fcontext_x86_64_win.hpp | 14 +++++++-------
   trunk/libs/context/doc/performance.qbk | 2 +-
   trunk/libs/context/example/exit.cpp | 24 ++++++++++++------------
   trunk/libs/context/example/jump.cpp | 26 +++++++++++++-------------
   trunk/libs/context/example/transfer.cpp | 14 +++++++-------
   trunk/libs/context/performance/performance.cpp | 2 +-
   trunk/libs/context/src/fcontext.cpp | 4 ++--
   trunk/libs/context/src/stack_allocator_posix.cpp | 6 +++---
   trunk/libs/context/test/test_context.cpp | 14 +++++++-------
   15 files changed, 61 insertions(+), 61 deletions(-)

Modified: trunk/boost/context/detail/fcontext_arm.hpp
==============================================================================
--- trunk/boost/context/detail/fcontext_arm.hpp (original)
+++ trunk/boost/context/detail/fcontext_arm.hpp 2012-05-22 16:02:04 EDT (Tue, 22 May 2012)
@@ -45,7 +45,7 @@
 struct fcontext_t
 {
     boost::uint32_t fc_greg[11];
- stack_t fc_stack;
+ stack_t fc_stack;
     fp_t fc_fp;
 
     fcontext_t() :

Modified: trunk/boost/context/detail/fcontext_i386.hpp
==============================================================================
--- trunk/boost/context/detail/fcontext_i386.hpp (original)
+++ trunk/boost/context/detail/fcontext_i386.hpp 2012-05-22 16:02:04 EDT (Tue, 22 May 2012)
@@ -37,7 +37,7 @@
 
 struct fp_t
 {
- boost::uint32_t fc_freg[2];
+ boost::uint32_t fc_freg[2];
 
     fp_t() :
         fc_freg()
@@ -46,8 +46,8 @@
 
 struct fcontext_t
 {
- boost::uint32_t fc_greg[6];
- stack_t fc_stack;
+ boost::uint32_t fc_greg[6];
+ stack_t fc_stack;
     fp_t fc_fp;
 
     fcontext_t() :

Modified: trunk/boost/context/detail/fcontext_i386_win.hpp
==============================================================================
--- trunk/boost/context/detail/fcontext_i386_win.hpp (original)
+++ trunk/boost/context/detail/fcontext_i386_win.hpp 2012-05-22 16:02:04 EDT (Tue, 22 May 2012)
@@ -52,7 +52,7 @@
 struct fcontext_t
 {
     boost::uint32_t fc_greg[6];
- stack_t fc_stack;
+ stack_t fc_stack;
     void * fc_excpt_lst;
     void * fc_local_storage;
     fp_t fc_fp;

Modified: trunk/boost/context/detail/fcontext_mips.hpp
==============================================================================
--- trunk/boost/context/detail/fcontext_mips.hpp (original)
+++ trunk/boost/context/detail/fcontext_mips.hpp 2012-05-22 16:02:04 EDT (Tue, 22 May 2012)
@@ -47,7 +47,7 @@
 struct fcontext_t
 {
     boost::uint64_t fc_greg[13];
- stack_t fc_stack;
+ stack_t fc_stack;
     fp_t fc_fp;
 
     fcontext_t() :

Modified: trunk/boost/context/detail/fcontext_ppc.hpp
==============================================================================
--- trunk/boost/context/detail/fcontext_ppc.hpp (original)
+++ trunk/boost/context/detail/fcontext_ppc.hpp 2012-05-22 16:02:04 EDT (Tue, 22 May 2012)
@@ -49,7 +49,7 @@
 # else
     boost::uint32_t fc_greg[23];
 # endif
- stack_t fc_stack;
+ stack_t fc_stack;
     fp_t fc_fp;
 
     fcontext_t() :

Modified: trunk/boost/context/detail/fcontext_x86_64.hpp
==============================================================================
--- trunk/boost/context/detail/fcontext_x86_64.hpp (original)
+++ trunk/boost/context/detail/fcontext_x86_64.hpp 2012-05-22 16:02:04 EDT (Tue, 22 May 2012)
@@ -45,7 +45,7 @@
 struct fcontext_t
 {
     boost::uint64_t fc_greg[8];
- stack_t fc_stack;
+ stack_t fc_stack;
     fp_t fc_fp;
 
     fcontext_t() :

Modified: trunk/boost/context/detail/fcontext_x86_64_win.hpp
==============================================================================
--- trunk/boost/context/detail/fcontext_x86_64_win.hpp (original)
+++ trunk/boost/context/detail/fcontext_x86_64_win.hpp 2012-05-22 16:02:04 EDT (Tue, 22 May 2012)
@@ -44,7 +44,7 @@
 struct fp_t
 {
     boost::uint32_t fc_freg[2];
- void * fc_xmm;
+ void * fc_xmm;
     char fc_buffer[175];
 
     fp_t() :
@@ -52,17 +52,17 @@
         fc_xmm( 0),
         fc_buffer()
     {
- fc_xmm = fc_buffer;
- if ( 0 != ( ( ( uintptr_t) fc_xmm) & 15) )
- fc_xmm = ( char *) ( ( ( ( uintptr_t) fc_xmm) + 15) & ~0x0F);
- }
+ fc_xmm = fc_buffer;
+ if ( 0 != ( ( ( uintptr_t) fc_xmm) & 15) )
+ fc_xmm = ( char *) ( ( ( ( uintptr_t) fc_xmm) + 15) & ~0x0F);
+ }
 };
 
 struct fcontext_t
 {
     boost::uint64_t fc_greg[10];
- stack_t fc_stack;
- void * fc_local_storage;
+ stack_t fc_stack;
+ void * fc_local_storage;
     fp_t fc_fp;
 
     fcontext_t() :

Modified: trunk/libs/context/doc/performance.qbk
==============================================================================
--- trunk/libs/context/doc/performance.qbk (original)
+++ trunk/libs/context/doc/performance.qbk 2012-05-22 16:02:04 EDT (Tue, 22 May 2012)
@@ -15,7 +15,7 @@
 'variant = release cxxflags = -DBOOST_DISABLE_ASSERTS'.
 
 The numbers in the table are the number of cycles per iteration, based upon an
-average computed over 256 iterations.
+average computed over 10 iterations.
 
 [table Perfomance of context switch
     [[Platform] [ucontext_t] [fcontext_t with fpu] [fcontext_t without fpu] [boost::function]]

Modified: trunk/libs/context/example/exit.cpp
==============================================================================
--- trunk/libs/context/example/exit.cpp (original)
+++ trunk/libs/context/example/exit.cpp 2012-05-22 16:02:04 EDT (Tue, 22 May 2012)
@@ -18,17 +18,17 @@
 
 void f1( intptr_t)
 {
- std::cout << "f1: entered" << std::endl;
- std::cout << "f1: call jump_fcontext( & fc1, & fc2, 0)" << std::endl;
- ctx::jump_fcontext( & fc1, & fc2, 0);
- std::cout << "f1: return" << std::endl;
+ std::cout << "f1: entered" << std::endl;
+ std::cout << "f1: call jump_fcontext( & fc1, & fc2, 0)" << std::endl;
+ ctx::jump_fcontext( & fc1, & fc2, 0);
+ std::cout << "f1: return" << std::endl;
 }
 
 void f2( intptr_t)
 {
- std::cout << "f2: entered" << std::endl;
- std::cout << "f2: call jump_fcontext( & fc2, & fc1, 0)" << std::endl;
- ctx::jump_fcontext( & fc2, & fc1, 0);
+ std::cout << "f2: entered" << std::endl;
+ std::cout << "f2: call jump_fcontext( & fc2, & fc1, 0)" << std::endl;
+ ctx::jump_fcontext( & fc2, & fc1, 0);
         BOOST_ASSERT( false && ! "f2: never returns");
 }
 
@@ -40,17 +40,17 @@
         fc1.fc_stack.base = alloc.allocate(ctx::minimum_stacksize());
         fc1.fc_stack.limit =
             static_cast< char * >( fc1.fc_stack.base) - ctx::minimum_stacksize();
- ctx::make_fcontext( & fc1, f1);
+ ctx::make_fcontext( & fc1, f1);
 
         fc2.fc_stack.base = alloc.allocate(ctx::minimum_stacksize());
         fc2.fc_stack.limit =
             static_cast< char * >( fc2.fc_stack.base) - ctx::minimum_stacksize();
- ctx::make_fcontext( & fc2, f2);
+ ctx::make_fcontext( & fc2, f2);
 
- std::cout << "main: call start_fcontext( & fcm, & fc1, 0)" << std::endl;
- ctx::jump_fcontext( & fcm, & fc1, 0);
+ std::cout << "main: call start_fcontext( & fcm, & fc1, 0)" << std::endl;
+ ctx::jump_fcontext( & fcm, & fc1, 0);
 
- std::cout << "main: done" << std::endl;
+ std::cout << "main: done" << std::endl;
         BOOST_ASSERT( false && ! "main: never returns");
 
         return EXIT_SUCCESS;

Modified: trunk/libs/context/example/jump.cpp
==============================================================================
--- trunk/libs/context/example/jump.cpp (original)
+++ trunk/libs/context/example/jump.cpp 2012-05-22 16:02:04 EDT (Tue, 22 May 2012)
@@ -18,18 +18,18 @@
 
 void f1( intptr_t)
 {
- std::cout << "f1: entered" << std::endl;
- std::cout << "f1: call jump_fcontext( & fc1, & fc2, 0)" << std::endl;
- ctx::jump_fcontext( & fc1, & fc2, 0);
- std::cout << "f1: return" << std::endl;
- ctx::jump_fcontext( & fc1, & fcm, 0);
+ std::cout << "f1: entered" << std::endl;
+ std::cout << "f1: call jump_fcontext( & fc1, & fc2, 0)" << std::endl;
+ ctx::jump_fcontext( & fc1, & fc2, 0);
+ std::cout << "f1: return" << std::endl;
+ ctx::jump_fcontext( & fc1, & fcm, 0);
 }
 
 void f2( intptr_t)
 {
- std::cout << "f2: entered" << std::endl;
- std::cout << "f2: call jump_fcontext( & fc2, & fc1, 0)" << std::endl;
- ctx::jump_fcontext( & fc2, & fc1, 0);
+ std::cout << "f2: entered" << std::endl;
+ std::cout << "f2: call jump_fcontext( & fc2, & fc1, 0)" << std::endl;
+ ctx::jump_fcontext( & fc2, & fc1, 0);
         BOOST_ASSERT( false && ! "f2: never returns");
 }
 
@@ -40,17 +40,17 @@
         fc1.fc_stack.base = alloc1.allocate(ctx::minimum_stacksize());
         fc1.fc_stack.limit =
             static_cast< char * >( fc1.fc_stack.base) - ctx::minimum_stacksize();
- ctx::make_fcontext( & fc1, f1);
+ ctx::make_fcontext( & fc1, f1);
 
         fc2.fc_stack.base = alloc2.allocate(ctx::minimum_stacksize());
         fc2.fc_stack.limit =
             static_cast< char * >( fc2.fc_stack.base) - ctx::minimum_stacksize();
- ctx::make_fcontext( & fc2, f2);
+ ctx::make_fcontext( & fc2, f2);
 
- std::cout << "main: call start_fcontext( & fcm, & fc1, 0)" << std::endl;
- ctx::jump_fcontext( & fcm, & fc1, 0);
+ std::cout << "main: call start_fcontext( & fcm, & fc1, 0)" << std::endl;
+ ctx::jump_fcontext( & fcm, & fc1, 0);
 
- std::cout << "main: done" << std::endl;
+ std::cout << "main: done" << std::endl;
 
         return EXIT_SUCCESS;
 }

Modified: trunk/libs/context/example/transfer.cpp
==============================================================================
--- trunk/libs/context/example/transfer.cpp (original)
+++ trunk/libs/context/example/transfer.cpp 2012-05-22 16:02:04 EDT (Tue, 22 May 2012)
@@ -23,29 +23,29 @@
 {
     pair_t * p = ( pair_t *) param;
 
- p = ( pair_t *) ctx::jump_fcontext( & fc1, & fcm, ( intptr_t) ( p->first + p->second) );
+ p = ( pair_t *) ctx::jump_fcontext( & fc1, & fcm, ( intptr_t) ( p->first + p->second) );
 
- ctx::jump_fcontext( & fc1, & fcm, ( intptr_t) ( p->first + p->second) );
+ ctx::jump_fcontext( & fc1, & fcm, ( intptr_t) ( p->first + p->second) );
 }
 
 int main( int argc, char * argv[])
 {
     ctx::stack_allocator alloc;
-
+
     fc1.fc_stack.base = alloc.allocate(ctx::minimum_stacksize());
     fc1.fc_stack.limit =
         static_cast< char * >( fc1.fc_stack.base) - ctx::minimum_stacksize();
     ctx::make_fcontext( & fc1, f1);
-
+
     pair_t p( std::make_pair( 2, 7) );
     int res = ( int) ctx::jump_fcontext( & fcm, & fc1, ( intptr_t) & p);
     std::cout << p.first << " + " << p.second << " == " << res << std::endl;
-
+
     p = std::make_pair( 5, 6);
     res = ( int) ctx::jump_fcontext( & fcm, & fc1, ( intptr_t) & p);
     std::cout << p.first << " + " << p.second << " == " << res << std::endl;
-
+
     std::cout << "main: done" << std::endl;
-
+
     return EXIT_SUCCESS;
 }

Modified: trunk/libs/context/performance/performance.cpp
==============================================================================
--- trunk/libs/context/performance/performance.cpp (original)
+++ trunk/libs/context/performance/performance.cpp 2012-05-22 16:02:04 EDT (Tue, 22 May 2012)
@@ -114,7 +114,7 @@
     fc.fc_stack.base = alloc.allocate(ctx::default_stacksize());
     fc.fc_stack.limit =
         static_cast< char * >( fc.fc_stack.base) - ctx::default_stacksize();
- ctx::make_fcontext( & fc, f1);
+ ctx::make_fcontext( & fc, f1);
 
     ctx::jump_fcontext( & fcm, & fc, 7, preserve_fpu);
 

Modified: trunk/libs/context/src/fcontext.cpp
==============================================================================
--- trunk/libs/context/src/fcontext.cpp (original)
+++ trunk/libs/context/src/fcontext.cpp 2012-05-22 16:02:04 EDT (Tue, 22 May 2012)
@@ -21,10 +21,10 @@
 extern "C" BOOST_CONTEXT_DECL
 void * BOOST_CONTEXT_CALLDECL align_stack( void * vp)
 {
- void * base = vp;
+ void * base = vp;
     if ( 0 != ( ( ( uintptr_t) base) & 15) )
         base = ( char * ) ( ( ( ( uintptr_t) base) - 15) & ~0x0F);
- return base;
+ return base;
 }
 
 }

Modified: trunk/libs/context/src/stack_allocator_posix.cpp
==============================================================================
--- trunk/libs/context/src/stack_allocator_posix.cpp (original)
+++ trunk/libs/context/src/stack_allocator_posix.cpp 2012-05-22 16:02:04 EDT (Tue, 22 May 2012)
@@ -45,7 +45,7 @@
                 % maximum_stacksize() ) );
 
     const std::size_t pages( page_count( size) + 1); // add +1 for guard page
- std::size_t size_ = pages * pagesize();
+ std::size_t size_ = pages * pagesize();
 
     const int fd( ::open("/dev/zero", O_RDONLY) );
     BOOST_ASSERT( -1 != fd);
@@ -69,8 +69,8 @@
 {
     if ( vp)
     {
- const std::size_t pages( page_count( size) + 1); // add +1 for guard page
- std::size_t size_ = pages * pagesize();
+ const std::size_t pages( page_count( size) + 1); // add +1 for guard page
+ std::size_t size_ = pages * pagesize();
         BOOST_ASSERT( 0 < size && 0 < size_);
         void * limit = static_cast< char * >( vp) - size_;
         ::munmap( limit, size_);

Modified: trunk/libs/context/test/test_context.cpp
==============================================================================
--- trunk/libs/context/test/test_context.cpp (original)
+++ trunk/libs/context/test/test_context.cpp 2012-05-22 16:02:04 EDT (Tue, 22 May 2012)
@@ -26,25 +26,25 @@
 void f1( intptr_t)
 {
     ++value1;
- ctx::jump_fcontext( & fc1, & fcm, 0);
+ ctx::jump_fcontext( & fc1, & fcm, 0);
 }
 
 void f3( intptr_t)
 {
     ++value1;
- ctx::jump_fcontext( & fc1, & fcm, 0);
+ ctx::jump_fcontext( & fc1, & fcm, 0);
     ++value1;
- ctx::jump_fcontext( & fc1, & fcm, 0);
+ ctx::jump_fcontext( & fc1, & fcm, 0);
 }
 
 void f4( intptr_t)
 {
- ctx::jump_fcontext( & fc1, & fcm, 7);
+ ctx::jump_fcontext( & fc1, & fcm, 7);
 }
 
 void f5( intptr_t arg)
 {
- ctx::jump_fcontext( & fc1, & fcm, arg);
+ ctx::jump_fcontext( & fc1, & fcm, arg);
 }
 
 void f6( intptr_t arg)
@@ -63,7 +63,7 @@
     { throw std::runtime_error( ( char *) arg); }
     catch ( std::runtime_error const& e)
     { value2 = e.what(); }
- ctx::jump_fcontext( & fc1, & fcm, arg);
+ ctx::jump_fcontext( & fc1, & fcm, arg);
 }
 
 void f8( intptr_t arg)
@@ -71,7 +71,7 @@
     double d = * ( double *) arg;
     d += 3.45;
     value3 = d;
- ctx::jump_fcontext( & fc1, & fcm, 0);
+ ctx::jump_fcontext( & fc1, & fcm, 0);
 }
 
 void test_start()


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk