From af68bf5d6a8631b24ccd940865224a8c993632f2 Mon Sep 17 00:00:00 2001 From: YuQing <384681@qq.com> Date: Thu, 6 Jan 2022 20:32:05 +0800 Subject: [PATCH] add macros: fc_queue_notify and fc_queue_notify_all --- src/fc_queue.h | 5 +++++ src/system_info.h | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/fc_queue.h b/src/fc_queue.h index ee588ec..adfbe4d 100644 --- a/src/fc_queue.h +++ b/src/fc_queue.h @@ -61,6 +61,11 @@ static inline void fc_queue_terminate_all( } } +#define fc_queue_notify(queue) fc_queue_terminate(queue) + +#define fc_queue_notify_all(queue, count) \ + fc_queue_terminate_all(queue, count) + //notify by the caller void fc_queue_push_ex(struct fc_queue *queue, void *data, bool *notify); diff --git a/src/system_info.h b/src/system_info.h index 8aa73ce..75f7dd9 100644 --- a/src/system_info.h +++ b/src/system_info.h @@ -123,21 +123,21 @@ extern "C" { /** get system total memory size * parameters: * mem_size: return the total memory size - * return: error no , 0 success, != 0 fail + * return: error no, 0 success, != 0 fail */ int get_sys_total_mem_size(int64_t *mem_size); /** get system CPU count * parameters: - * return: error no , 0 success, != 0 fail + * return: error no, 0 success, != 0 fail */ int get_sys_cpu_count(); /** get system boot time * parameters: * uptime: store the up time - * return: error no , 0 success, != 0 fail + * return: error no, 0 success, != 0 fail */ int get_boot_time(struct timeval *boot_time); @@ -146,7 +146,7 @@ int get_boot_time(struct timeval *boot_time); * stats: the stat array * size: max size of the array * count: return the count of the array - * return: error no , 0 success, != 0 fail + * return: error no, 0 success, != 0 fail */ int get_mounted_filesystems(struct fast_statfs *stats, const int size, int *count); @@ -156,7 +156,7 @@ int get_mounted_filesystems(struct fast_statfs *stats, * parameters: * processes: return the processes * count: return the count of the processes - * return: error no , 0 success, != 0 fail + * return: error no, 0 success, != 0 fail */ int get_processes(struct fast_process_info **processes, int *count);