libcsdbg  1.28
C++ exception (and generic) stack trace debug library
streambuf & csdbg::streambuf::unlock ( ) const
virtual

Unlock the stream.

Returns
*this
Exceptions
i32(errno)

Definition at line 210 of file streambuf.cpp.

References m_handle, and unlikely.

211 {
212  i32 retval;
213  do {
214  retval = flock(m_handle, LOCK_UN);
215  }
216  while ( unlikely(retval < 0 && errno == EINTR) );
217 
218  if ( unlikely(retval < 0) )
219  throw errno;
220 
221  return const_cast<streambuf&> (*this);
222 }
i32 m_handle
Stream handle (descriptor)
Definition: streambuf.hpp:43
streambuf()
Object default constructor.
Definition: streambuf.cpp:20
int i32
32-bit signed integer
Definition: config.hpp:82
#define unlikely(expr)
Offer a hint (negative) to the pipeline branch predictor.
Definition: config.hpp:349