DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
Cloud Backup
True Drop Box
FTP/SFTP Hosting
Group Account
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Online Backup Tool
|
Cloud-to-Cloud Backup
FTP, Email & Web Service
FTP Home
|
FTP Hosting FAQ
|
Email Hosting
|
EmailManager
|
Web Hosting
Help & Resources
About
|
Enterprise Service
|
Partnership
|
Comparisons
|
Support
Quick Links
Security and Privacy
Download Software
Service Manual
Use Cases
Group Account
Online Help
Blog
Contact
Cloud Surveillance
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
IP Camera & DVR Solution
More...
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
More...
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
#ifndef BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED #define BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // boost/detail/atomic_count.hpp - thread/SMP safe reference counter // // Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // typedef
boost::detail::atomic_count; // // atomic_count a(n); // // (n is convertible to long) // // Effects: Constructs an atomic_count with an initial value of n // // a; // // Returns: (long) the current value of a // // ++a; // // Effects: Atomically increments the value of a // Returns: nothing // // --a; // // Effects: Atomically decrements the value of a // Returns: (long) zero if the new value of a is zero, // unspecified non-zero value otherwise (usually the new value) // // Important note: when --a returns zero, it must act as a // read memory barrier (RMB); i.e. the calling thread must // have a synchronized view of the memory // // On Intel IA-32 (x86) memory is always synchronized, so this // is not a problem. // // On many architectures the atomic instructions already act as // a memory barrier. // // This property is necessary for proper reference counting, since // a thread can update the contents of a shared object, then // release its reference, and another thread may immediately // release the last reference causing object destruction. // // The destructor needs to have a synchronized view of the // object to perform proper cleanup. // // Original example by Alexander Terekhov: // // Given: // // - a mutable shared object OBJ; // - two threads THREAD1 and THREAD2 each holding // a private smart_ptr object pointing to that OBJ. // // t1: THREAD1 updates OBJ (thread-safe via some synchronization) // and a few cycles later (after "unlock") destroys smart_ptr; // // t2: THREAD2 destroys smart_ptr WITHOUT doing any synchronization // with respect to shared mutable object OBJ; OBJ destructors // are called driven by smart_ptr interface... // #include
#ifndef BOOST_HAS_THREADS namespace boost { namespace detail { typedef long atomic_count; } } #elif defined(BOOST_AC_USE_PTHREADS) # include
#elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) ) # include
#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) # include
#elif defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) # include
#elif defined(__GLIBCPP__) || defined(__GLIBCXX__) # include
#elif defined(BOOST_HAS_PTHREADS) # define BOOST_AC_USE_PTHREADS # include
#else // Use #define BOOST_DISABLE_THREADS to avoid the error #error Unrecognized threading platform #endif #endif // #ifndef BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED
atomic_count.hpp
Page URL
File URL
Prev
3/61
Next
Download
( 3 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.