/* * Copyright (c) 2020 YuQing <384681@qq.com> * * This program is free software: you can use, redistribute, and/or modify * it under the terms of the Lesser GNU General Public License, version 3 * or later ("LGPL"), as published by the Free Software Foundation. * * 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. * * You should have received a copy of the Lesser GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include "fastcommon/logger.h" #include "fastcommon/shared_func.h" #include "fastcommon/sched_thread.h" #include "fastcommon/pthread_func.h" #include "fastcommon/ini_file_reader.h" #include "fastcommon/thread_pool.h" #define LOOP_COUNT (10 * 1000 * 1000) static volatile int counter = 0; static volatile int64_t total = 0; #define TASK_COUNT 10 void thread2_func(void *args, void *thread_data) { int i; for (i=0; i