Browse Source

Cleanup: Simplify sync_array_object_signalled()

pull/1674/head
Marko Mäkelä 5 years ago
parent
commit
ef254efc65
  1. 9
      storage/innobase/include/sync0arr.h
  2. 11
      storage/innobase/sync/sync0arr.cc

9
storage/innobase/include/sync0arr.h

@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, 2018, MariaDB Corporation.
Copyright (c) 2015, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@ -79,10 +79,9 @@ sync_array_free_cell(
sync_array_t* arr, /*!< in: wait array */
sync_cell_t*& cell); /*!< in: the reserved cell */
/**********************************************************************//**
Note that one of the wait objects was signalled. */
void
sync_array_object_signalled();
/** count of how many times an object has been signalled */
extern ulint sg_count;
#define sync_array_object_signalled() ++sg_count
/**********************************************************************//**
Prints warnings of long semaphore waits to stderr.

11
storage/innobase/sync/sync0arr.cc

@ -169,7 +169,7 @@ mutexes and read-write locks */
sync_array_t** sync_wait_array;
/** count of how many times an object has been signalled */
static ulint sg_count;
ulint sg_count;
#define sync_array_exit(a) mutex_exit(&(a)->mutex)
#define sync_array_enter(a) mutex_enter(&(a)->mutex)
@ -859,15 +859,6 @@ sync_array_detect_deadlock(
}
#endif /* UNIV_DEBUG */
/**********************************************************************//**
Increments the signalled count. */
void
sync_array_object_signalled()
/*=========================*/
{
++sg_count;
}
/**********************************************************************//**
Prints warnings of long semaphore waits to stderr.
@return TRUE if fatal semaphore wait threshold was exceeded */

Loading…
Cancel
Save