sched_thread.h

来自「文件系统源代码!!!!! 文件系统源代码」· C头文件 代码 · 共 45 行

H
45
字号
/*** Copyright (C) 2008 Happy Fish / YuQing** FastDFS may be copied only under the terms of the GNU General* Public License V3, which may be found in the FastDFS source kit.* Please visit the FastDFS Home Page http://www.csource.org/ for more detail.**/#ifndef _SCHED_THREAD_H_#define _SCHED_THREAD_H_#include "fdfs_define.h"typedef void (*TaskFunc) (void *args);typedef struct tagScheduleEntry{	int interval;   //unit: second	TaskFunc task_func;	void *func_args;	time_t next_call_time;	struct tagScheduleEntry *next;} ScheduleEntry;typedef struct{	ScheduleEntry *entries;	int count;} ScheduleArray;#ifdef __cplusplusextern "C" {#endifextern bool g_continue_flag;int sched_start(ScheduleArray *pScheduleArray, pthread_t *ptid);#ifdef __cplusplus}#endif#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?