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
////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2005-2008. 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) // // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// // // barrier is a modified version of Boost Threads barrier // ////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002-2003 // David Moore, William E. Kempf // // Permission to use, copy, modify, distribute and sell this software // and its documentation for any purpose is hereby granted without fee, // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. William E. Kempf makes no representations // about the suitability of this software for any purpose. // It is provided "as is" without express or implied warranty. #ifndef BOOST_INTERPROCESS_BARRIER_HPP #define BOOST_INTERPROCESS_BARRIER_HPP #if (defined _MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include
#include
#if defined BOOST_INTERPROCESS_POSIX_PROCESS_SHARED && defined BOOST_INTERPROCESS_POSIX_BARRIERS # include
# include
# include
# define BOOST_INTERPROCESS_USE_POSIX #else # include
# include
# include
# include
# define BOOST_INTERPROCESS_USE_GENERIC_EMULATION #endif # include
namespace boost { namespace interprocess { //!An object of class barrier is a synchronization primitive that //!can be placed in shared memory used to cause a set of threads from //!different processes to wait until they each perform a certain //!function or each reach a particular point in their execution. class barrier { public: //!Constructs a barrier object that will cause count threads //!to block on a call to wait(). barrier(unsigned int count); //!Destroys *this. If threads are still executing their wait() //!operations, the behavior for these threads is undefined. ~barrier(); //!Effects: Wait until N threads call wait(), where N equals the count //!provided to the constructor for the barrier object. //!Note that if the barrier is destroyed before wait() can return, //!the behavior is undefined. //!Returns: Exactly one of the N threads will receive a return value //!of true, the others will receive a value of false. Precisely which //!thread receives the return value of true will be implementation-defined. //!Applications can use this value to designate one thread as a leader that //!will take a certain action, and the other threads emerging from the barrier //!can wait for that action to take place. bool wait(); /// @cond private: #if defined(BOOST_INTERPROCESS_USE_GENERIC_EMULATION) interprocess_mutex m_mutex; interprocess_condition m_cond; unsigned int m_threshold; unsigned int m_count; unsigned int m_generation; #else //#if defined BOOST_INTERPROCESS_USE_POSIX pthread_barrier_t m_barrier; #endif//#if defined BOOST_INTERPROCESS_USE_POSIX /// @endcond }; } // namespace interprocess } // namespace boost #ifdef BOOST_INTERPROCESS_USE_GENERIC_EMULATION # undef BOOST_INTERPROCESS_USE_GENERIC_EMULATION # include
#endif #ifdef BOOST_INTERPROCESS_USE_POSIX # undef BOOST_INTERPROCESS_USE_POSIX # include
#endif #include
#endif
interprocess_barrier.hpp
Page URL
File URL
Prev
2/18
Next
Download
( 4 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.