Skip to content
Permalink
Browse files
Cleanup: Simplify sync_array_object_signalled()
  • Loading branch information
dr-m committed Sep 30, 2020
1 parent 363da42 commit ef254ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
@@ -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.
@@ -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 */

0 comments on commit ef254ef

Please sign in to comment.