Source
if (SUCCEED != zbx_timekeeper_get_stat(collector.monitor, unit_index, unit_count, aggr_func, state, value, &error))
/*
** Zabbix
** Copyright (C) 2001-2023 Zabbix SIA
**
** 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 Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
typedef struct
{
zbx_timekeeper_t *monitor;
zbx_timekeeper_sync_t sync;
int process_index[ZBX_PROCESS_TYPE_COUNT];
}
zbx_selfmon_collector_t;
static zbx_selfmon_collector_t collector;
static zbx_get_config_forks_f get_config_forks_cb = NULL;
static zbx_mutex_t sm_lock = ZBX_MUTEX_NULL;
static zbx_shmem_info_t *sm_mem = NULL;
ZBX_SHMEM_FUNC_IMPL(__sm, sm_mem)
static void sm_sync_lock(void *data)
{
zbx_mutex_t *mutex = (zbx_mutex_t *)data;
zbx_mutex_lock(*mutex);
}
static void sm_sync_unlock(void *data)
{
zbx_mutex_t *mutex = (zbx_mutex_t *)data;