BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslmt_once.h File Reference
#include <bsls_ident.h>
#include <bslscm_version.h>
#include <bslmt_qlock.h>
#include <bsls_atomicoperations.h>
#include <bsls_assert.h>
#include <bsls_buildtarget.h>
#include <bsls_performancehint.h>
#include <bsls_platform.h>
#include <bsl_exception.h>

Go to the source code of this file.

Classes

class  bslmt::Once
 
class  bslmt::OnceGuard
 

Macros

#define BSLMT_ONCE_UNIQNUM   __LINE__
 
#define BSLMT_ONCE_DO    BSLMT_ONCE_DO_IMP(BSLMT_ONCE_CAT(bslmt_doOnceObj, BSLMT_ONCE_UNIQNUM))
 
#define BSLMT_ONCE_CANCEL()   bslmt_doOnceGuard.cancel()
 
#define BSLMT_ONCE_INITIALIZER   { BSLMT_QLOCK_INITIALIZER, { 0 } }
 
#define BSLMT_ONCE_CAT(X, Y)   BSLMT_ONCE_CAT_IMP(X, Y)
 
#define BSLMT_ONCE_CAT_IMP(X, Y)   X##Y
 
#define BSLMT_ONCE_DO_IMP(doOnceObj)
 
#define BSLMT_ONCE__CAT(X, Y)   BSLMT_ONCE_CAT(X, Y)
 

Detailed Description

The content of this file has been pre-processed for Doxygen.

Macro Definition Documentation

◆ BSLMT_ONCE_CAT

#define BSLMT_ONCE_CAT (   X,
 
)    BSLMT_ONCE_CAT_IMP(X, Y)

◆ BSLMT_ONCE_CAT_IMP

#define BSLMT_ONCE_CAT_IMP (   X,
 
)    X##Y

◆ BSLMT_ONCE_DO_IMP

#define BSLMT_ONCE_DO_IMP (   doOnceObj)
Value:
static BloombergLP::bslmt::Once doOnceObj = BSLMT_ONCE_INITIALIZER; \
doOnceObj.isMaybeUninitialized())) \
for (BloombergLP::bslmt::OnceGuard /* NOLINT */\
bslmt_doOnceGuard(&doOnceObj);\
bslmt_doOnceGuard.enter(); bslmt_doOnceGuard.leave())
#define BSLMT_ONCE_INITIALIZER
Definition bslmt_once.h:437
#define BSLS_PERFORMANCEHINT_PREDICT_UNLIKELY(expr)
Definition bsls_performancehint.h:452