Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/lib/tdb/include/tdb.h

    r986 r988  
    3232
    3333#include <signal.h>
     34#include <stdbool.h>
    3435
    3536/**
     
    8182#define TDB_DISALLOW_NESTING 1024 /** Disallow transactions to nest */
    8283#define TDB_INCOMPATIBLE_HASH 2048 /** Better hashing: can't be opened by tdb < 1.2.6. */
     84#define TDB_MUTEX_LOCKING 4096 /** optimized locking using robust mutexes if supported,
     85                                   only with tdb >= 1.3.0 and TDB_CLEAR_IF_FIRST
     86                                   after checking tdb_runtime_check_for_robust_mutexes() */
    8387
    8488/** The tdb error codes */
     
    133137 *                         TDB_CLEAR_IF_FIRST - Clear database if we are the
    134138 *                                              only one with it open\n
    135  *                         TDB_INTERNAL - Don't use a file, instaed store the
     139 *                         TDB_INTERNAL - Don't use a file, instead store the
    136140 *                                        data in memory. The filename is
    137141 *                                        ignored in this case.\n
     
    144148 *                         TDB_ALLOW_NESTING - Allow transactions to nest.\n
    145149 *                         TDB_DISALLOW_NESTING - Disallow transactions to nest.\n
     150 *                         TDB_INCOMPATIBLE_HASH - Better hashing: can't be opened by tdb < 1.2.6.\n
     151 *                         TDB_MUTEX_LOCKING - Optimized locking using robust mutexes if supported,
     152 *                                             can't be opened by tdb < 1.3.0.
     153 *                                             Only valid in combination with TDB_CLEAR_IF_FIRST
     154 *                                             after checking tdb_runtime_check_for_robust_mutexes()\n
    146155 *
    147156 * @param[in]  open_flags Flags for the open(2) function.
     
    169178 *                         TDB_CLEAR_IF_FIRST - Clear database if we are the
    170179 *                                              only one with it open\n
    171  *                         TDB_INTERNAL - Don't use a file, instaed store the
     180 *                         TDB_INTERNAL - Don't use a file, instead store the
    172181 *                                        data in memory. The filename is
    173182 *                                        ignored in this case.\n
     
    180189 *                         TDB_ALLOW_NESTING - Allow transactions to nest.\n
    181190 *                         TDB_DISALLOW_NESTING - Disallow transactions to nest.\n
     191 *                         TDB_INCOMPATIBLE_HASH - Better hashing: can't be opened by tdb < 1.2.6.\n
     192 *                         TDB_MUTEX_LOCKING - Optimized locking using robust mutexes if supported,
     193 *                                             can't be opened by tdb < 1.3.0.
     194 *                                             Only valid in combination with TDB_CLEAR_IF_FIRST
     195 *                                             after checking tdb_runtime_check_for_robust_mutexes()\n
    182196 *
    183197 * @param[in]  open_flags Flags for the open(2) function.
     
    213227 * pointer from our parent and to re-establish locks.
    214228 *
    215  * @param[in]  tdb      The database to reopen.
     229 * @param[in]  tdb      The database to reopen. It will be free'd on error!
    216230 *
    217231 * @return              0 on success, -1 on error.
     232 *
     233 * @note Don't call tdb_error() after this function cause the tdb context will
     234 *       be freed on error.
    218235 */
    219236int tdb_reopen(struct tdb_context *tdb);
     
    362379 * @brief Close a database.
    363380 *
    364  * @param[in]  tdb      The database to close.
     381 * @param[in]  tdb      The database to close. The context will be free'd.
    365382 *
    366383 * @return              0 for success, -1 on error.
     384 *
     385 * @note Don't call tdb_error() after this function cause the tdb context will
     386 *       be freed on error.
    367387 */
    368388int tdb_close(struct tdb_context *tdb);
     
    397417 * @brief Traverse the entire database.
    398418 *
    399  * While travering the function fn(tdb, key, data, state) is called on each
     419 * While traversing the function fn(tdb, key, data, state) is called on each
    400420 * element. If fn is NULL then it is not called. A non-zero return value from
    401421 * fn() indicates that the traversal should stop. Traversal callbacks may not
     
    772792 *
    773793 * This only works if the tdb has been opened using the TDB_SEQNUM flag or
    774  * enabled useing tdb_enable_seqnum().
     794 * enabled using tdb_enable_seqnum().
    775795 *
    776796 * @param[in]  tdb      The database to increment the sequence number.
     
    814834              int (*check) (TDB_DATA key, TDB_DATA data, void *private_data),
    815835              void *private_data);
     836
     837/**
     838 * @brief Dump all possible records in a corrupt database.
     839 *
     840 * This is the only way to get data out of a database where tdb_check() fails.
     841 * It will call walk() with anything which looks like a database record; this
     842 * may well include invalid, incomplete or duplicate records.
     843 *
     844 * @param[in]  tdb      The database to check.
     845 *
     846 * @param[in]  walk     The walk function to use.
     847 *
     848 * @param[in]  private_data the private data to pass to the walk function.
     849 *
     850 * @return              0 on success, -1 on error with error code set.
     851 *
     852 * @see tdb_error()
     853 * @see tdb_errorstr()
     854 */
     855int tdb_rescue(struct tdb_context *tdb,
     856               void (*walk) (TDB_DATA key, TDB_DATA data, void *private_data),
     857               void *private_data);
     858
     859/**
     860 * @brief Check if support for TDB_MUTEX_LOCKING is available at runtime.
     861 *
     862 * On some systems the API for pthread_mutexattr_setrobust() is not available.
     863 * On other systems there are some bugs in the interaction between glibc and
     864 * the linux kernel.
     865 *
     866 * This function provides a runtime check if robust mutexes are really
     867 * available.
     868 *
     869 * This needs to be called and return true before TDB_MUTEX_LOCKING
     870 * can be used at runtime.
     871 *
     872 * @note This calls fork(), but the SIGCHILD handling should be transparent.
     873 *
     874 * @return              true if supported, false otherwise.
     875 *
     876 * @see TDB_MUTEX_LOCKING
     877 */
     878bool tdb_runtime_check_for_robust_mutexes(void);
    816879
    817880/* @} ******************************************************************/
     
    822885int tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key);
    823886int tdb_chainlock_read(struct tdb_context *tdb, TDB_DATA key);
     887int tdb_chainlock_read_nonblock(struct tdb_context *tdb, TDB_DATA key);
    824888int tdb_chainunlock_read(struct tdb_context *tdb, TDB_DATA key);
    825889int tdb_chainlock_mark(struct tdb_context *tdb, TDB_DATA key);
Note: See TracChangeset for help on using the changeset viewer.