Portable test_and_set, please...
 
            
            
            
            
                1 Oct
                
                    2004
                
            
            
                1 Oct
                
                '04
                
            
            
            
        
    
                5:11 a.m.
            
        Hi all, I see some atomic operations in atomic_count.hpp (usable only by the atomic_count class unfortunately, and not directly) for incrementing and decrementing, but the most important atomic operation seems to be missing: the test_and_set. Without that one it's not possible to create lockfree algorithms in MT. Also, atomic incrementing, decrementing etc. can be performed having the test_and_set but not vice versa. Would anybody please make a wrapper for that? On Windows it's the InterlockedCompareExchange, on Gcc and Linux I think they are called __test_and_set and atomic_test_and_set respectively. I don't know if they would better go in the Boost.Threads or in the atomic_something header files... Thanks
        7700
        
      
          Age (days ago)
        
      
        7700
        
    
          Last active (days ago)
        
        
        
        0 comments
    
    
        
        1 participants
    
    
    
    
    
    
    
    
    participants (1)
- 
                 no_carrier no_carrier