43 extern ibool lock_print_waits;
110 const rec_t* old_end);
131 const rec_t* orig_succ,
178 const rec_t* orig_pred,
269 __attribute__((warn_unused_result));
292 __attribute__((nonnull, warn_unused_result));
313 __attribute__((warn_unused_result, nonnull));
334 __attribute__((warn_unused_result, nonnull(2,3,4,6)));
421 __attribute__((nonnull, warn_unused_result));
453 __attribute__((nonnull, warn_unused_result));
468 __attribute__((nonnull, warn_unused_result));
489 enum lock_mode lock_mode);
510 ibool remove_also_table_sx_locks);
523 __attribute__((
const));
560 enum lock_mode*
mode);
573 __attribute__((nonnull));
597 __attribute__((nonnull));
624 __attribute__((nonnull, warn_unused_result));
644 __attribute__((nonnull, warn_unused_result));
754 extern "C" UNIV_INTERN
802 __attribute__((nonnull));
811 __attribute__((nonnull));
818 lock_check_trx_id_sanity(
824 __attribute__((nonnull, warn_unused_result));
831 lock_trx_has_sys_table_locks(
834 __attribute__((warn_unused_result));
841 lock_trx_has_rec_x_lock(
847 __attribute__((nonnull, warn_unused_result));
852 #define LOCK_MODE_MASK 0xFUL
856 #define LOCK_TABLE 16
858 #define LOCK_TYPE_MASK 0xF0UL
860 #if LOCK_MODE_MASK & LOCK_TYPE_MASK
861 # error "LOCK_MODE_MASK & LOCK_TYPE_MASK"
864 #define LOCK_WAIT 256
869 #define LOCK_ORDINARY 0
879 #define LOCK_REC_NOT_GAP 1024
887 #define LOCK_INSERT_INTENTION 2048
895 #define LOCK_CONV_BY_OTHER 4096
897 #if (LOCK_WAIT|LOCK_GAP|LOCK_REC_NOT_GAP|LOCK_INSERT_INTENTION|LOCK_CONV_BY_OTHER)&LOCK_MODE_MASK
900 #if (LOCK_WAIT|LOCK_GAP|LOCK_REC_NOT_GAP|LOCK_INSERT_INTENTION|LOCK_CONV_BY_OTHER)&LOCK_TYPE_MASK
908 #define lock_is_wait_not_by_other(type_mode) \
909 ((type_mode & (LOCK_CONV_BY_OTHER | LOCK_WAIT)) == LOCK_WAIT)
954 #define lock_mutex_enter_nowait() mutex_enter_nowait(&lock_sys->mutex)
957 #define lock_mutex_own() mutex_own(&lock_sys->mutex)
960 #define lock_mutex_enter() do { \
961 mutex_enter(&lock_sys->mutex); \
965 #define lock_mutex_exit() do { \
966 mutex_exit(&lock_sys->mutex); \
970 #define lock_wait_mutex_own() mutex_own(&lock_sys->wait_mutex)
973 #define lock_wait_mutex_enter() do { \
974 mutex_enter(&lock_sys->wait_mutex); \
978 #define lock_wait_mutex_exit() do { \
979 mutex_exit(&lock_sys->wait_mutex); \
983 #include "lock0lock.ic"