OSDN Git Service

Modify include/lockfree_queue.h
authorkanda <kanda@1ed66053-1c2d-0410-8867-f7571e6e31d3>
Tue, 9 Jun 2009 02:32:07 +0000 (02:32 +0000)
committerkanda <kanda@1ed66053-1c2d-0410-8867-f7571e6e31d3>
Tue, 9 Jun 2009 02:32:07 +0000 (02:32 +0000)
// push interface
// push(const Tvalue* inptr) -> push(const Tvalue& value)

by Kanda

git-svn-id: http://10.144.169.20/repos/um/branches/l7vsd-3.x-shamshel-refine@7892 1ed66053-1c2d-0410-8867-f7571e6e31d3

include/lockfree_queue.h

index 64751c4..8930a1f 100644 (file)
@@ -41,10 +41,10 @@ public:
                delete new_node;
        }
        
-       void push(const Tvalue* inptr){
+       void push(const Tvalue& value){
                node_type *_new_node,*_tail,*_next;
                _new_node = new node_type();
-               _new_node->value = const_cast<Tvalue*>( inptr );
+               _new_node->value = const_cast<Tvalue*>(&value);
 
                // transaction st
                while(true){
@@ -57,7 +57,6 @@ public:
                        }else{
                                cas(&tailloc,_tail,_next);
                        }
-
                }
                // transaction ed