1 #ifndef BOOST_DETAIL_LWM_IRIX_HPP_INCLUDED
2 #define BOOST_DETAIL_LWM_IRIX_HPP_INCLUDED
9 // boost/detail/lwm_irix.hpp
11 // Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
12 // Copyright (c) 2002 Dan Gohman
14 // Permission to copy, use, modify, sell and distribute this software
15 // is granted provided this copyright notice appears in all copies.
16 // This software is provided "as is" without express or implied
17 // warranty, and with no claim as to its suitability for any purpose.
30 class lightweight_mutex
36 lightweight_mutex(lightweight_mutex const &);
37 lightweight_mutex & operator=(lightweight_mutex const &);
41 lightweight_mutex(): l_(0)
46 friend class scoped_lock;
52 lightweight_mutex & m_;
54 scoped_lock(scoped_lock const &);
55 scoped_lock & operator=(scoped_lock const &);
59 explicit scoped_lock(lightweight_mutex & m): m_(m)
61 while( test_and_set32(&m_.l_, 1) )
78 #endif // #ifndef BOOST_DETAIL_LWM_IRIX_HPP_INCLUDED