コード例 #1
0
ファイル: prod_index_map.c プロジェクト: bradh/LDM
/**
 * Restores the signal mask to what it was when `blockSigs()` was called and
 * unblocks the product-index map.
 *
 * @pre                 {`lockMapAndBlockSigs` was previously called}
 * @retval 0            Success.
 * @retval LDM7_SYSTEM  System error. `log_add()` called.
 */
static inline Ldm7Status
restoreSignalsAndUnlockMap(void)
{
    restoreSigs();

    return unlockMap();
}
コード例 #2
0
ファイル: log.c プロジェクト: khallock/LDM
/**
 * Clears the accumulated log-messages of the current thread.
 */
void log_clear()
{
    sigset_t sigset;
    blockSigs(&sigset);

    List*   list = getList();

    if (NULL != list)
        list->last = NULL;

    restoreSigs(&sigset);
}