mirror of
https://github.com/boostorg/interprocess.git
synced 2026-01-19 04:12:13 +00:00
Use is_pos_infinity() instead of pos_inf due to some old MinGW compilers ICEing on the conversion from the special value to ptime
This commit is contained in:
@@ -709,7 +709,7 @@ inline bool message_queue_t<VoidPointer>::timed_send
|
||||
(const void *buffer, size_type buffer_size
|
||||
,unsigned int priority, const boost::posix_time::ptime &abs_time)
|
||||
{
|
||||
if(abs_time == boost::posix_time::pos_infin){
|
||||
if(abs_time.is_pos_infinity()){
|
||||
this->send(buffer, buffer_size, priority);
|
||||
return true;
|
||||
}
|
||||
@@ -834,7 +834,7 @@ inline bool
|
||||
size_type &recvd_size, unsigned int &priority,
|
||||
const boost::posix_time::ptime &abs_time)
|
||||
{
|
||||
if(abs_time == boost::posix_time::pos_infin){
|
||||
if(abs_time.is_pos_infinity()){
|
||||
this->receive(buffer, buffer_size, recvd_size, priority);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -36,11 +36,11 @@ class internal_mutex_lock
|
||||
typedef typename Lock::mutex_type::internal_mutex_type mutex_type;
|
||||
|
||||
|
||||
internal_mutex_lock(Lock &l)
|
||||
BOOST_INTERPROCESS_FORCEINLINE internal_mutex_lock(Lock &l)
|
||||
: l_(l)
|
||||
{}
|
||||
|
||||
mutex_type* mutex() const
|
||||
BOOST_INTERPROCESS_FORCEINLINE mutex_type* mutex() const
|
||||
{ return l_ ? &l_.mutex()->internal_mutex() : 0; }
|
||||
|
||||
BOOST_INTERPROCESS_FORCEINLINE void lock() { l_.lock(); }
|
||||
@@ -59,7 +59,7 @@ class lock_inverter
|
||||
{
|
||||
Lock &l_;
|
||||
public:
|
||||
lock_inverter(Lock &l)
|
||||
BOOST_INTERPROCESS_FORCEINLINE lock_inverter(Lock &l)
|
||||
: l_(l)
|
||||
{}
|
||||
|
||||
@@ -74,7 +74,7 @@ class lock_to_sharable
|
||||
Lock &l_;
|
||||
|
||||
public:
|
||||
explicit lock_to_sharable(Lock &l)
|
||||
BOOST_INTERPROCESS_FORCEINLINE explicit lock_to_sharable(Lock &l)
|
||||
: l_(l)
|
||||
{}
|
||||
|
||||
@@ -91,7 +91,7 @@ class lock_to_wait
|
||||
Lock &l_;
|
||||
|
||||
public:
|
||||
explicit lock_to_wait(Lock &l)
|
||||
BOOST_INTERPROCESS_FORCEINLINE explicit lock_to_wait(Lock &l)
|
||||
: l_(l)
|
||||
{}
|
||||
BOOST_INTERPROCESS_FORCEINLINE void lock() { l_.wait(); }
|
||||
|
||||
@@ -90,7 +90,7 @@ class posix_condition
|
||||
if (!lock)
|
||||
throw lock_exception();
|
||||
//Posix does not support infinity absolute time so handle it here
|
||||
if(abs_time == boost::posix_time::pos_infin){
|
||||
if(abs_time.is_pos_infinity()){
|
||||
this->wait(lock);
|
||||
return true;
|
||||
}
|
||||
@@ -106,7 +106,7 @@ class posix_condition
|
||||
if (!lock)
|
||||
throw lock_exception();
|
||||
//Posix does not support infinity absolute time so handle it here
|
||||
if(abs_time == boost::posix_time::pos_infin){
|
||||
if(abs_time.is_pos_infinity()){
|
||||
this->wait(lock, pred);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ inline bool posix_mutex::timed_lock(const boost::posix_time::ptime &abs_time)
|
||||
{
|
||||
#ifdef BOOST_INTERPROCESS_POSIX_TIMEOUTS
|
||||
//Posix does not support infinity absolute time so handle it here
|
||||
if(abs_time == boost::posix_time::pos_infin){
|
||||
if(abs_time.is_pos_infinity()){
|
||||
this->lock();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ inline bool posix_recursive_mutex::timed_lock(const boost::posix_time::ptime &ab
|
||||
{
|
||||
#ifdef BOOST_INTERPROCESS_POSIX_TIMEOUTS
|
||||
//Posix does not support infinity absolute time so handle it here
|
||||
if(abs_time == boost::posix_time::pos_infin){
|
||||
if(abs_time.is_pos_infinity()){
|
||||
this->lock();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ inline bool semaphore_timed_wait(sem_t *handle, const boost::posix_time::ptime &
|
||||
{
|
||||
#ifdef BOOST_INTERPROCESS_POSIX_TIMEOUTS
|
||||
//Posix does not support infinity absolute time so handle it here
|
||||
if(abs_time == boost::posix_time::pos_infin){
|
||||
if(abs_time.is_pos_infinity()){
|
||||
semaphore_wait(handle);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ class spin_condition
|
||||
if (!lock)
|
||||
throw lock_exception();
|
||||
//Handle infinity absolute time here to avoid complications in do_timed_wait
|
||||
if(abs_time == boost::posix_time::pos_infin){
|
||||
if(abs_time.is_pos_infinity()){
|
||||
this->wait(lock);
|
||||
return true;
|
||||
}
|
||||
@@ -65,7 +65,7 @@ class spin_condition
|
||||
if (!lock)
|
||||
throw lock_exception();
|
||||
//Handle infinity absolute time here to avoid complications in do_timed_wait
|
||||
if(abs_time == boost::posix_time::pos_infin){
|
||||
if(abs_time.is_pos_infinity()){
|
||||
this->wait(lock, pred);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user