File: task.h

package info (click to toggle)
gman 0.9.3-5.3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 652 kB
  • sloc: ansic: 7,389; makefile: 131; perl: 105
file content (28 lines) | stat: -rw-r--r-- 682 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/************************ task.h ***************************/
/************************ 1999.6.21 ************************/

#ifndef _TASK_H
#define _TASK_H

#include <glib.h>
#include "list.h"

typedef enum
{
  TASK_RUNNING		= 1 << 0,
  TASK_START		= 1 << 1,
  TASK_STOP			= 1 << 2,
} MyTaskRunningFlags;

typedef struct _task_group TaskGroup;
typedef struct _task Task;
typedef int (* TaskRunFunc) (int flag, gpointer data);

TaskGroup * task_group_new();
Task 	* 	task_new(TaskGroup * thread, float priority, TaskRunFunc task_func, gpointer data);
void 		task_signal_send(Task * task, int signal);
void 		task_set_active(Task * task);
void 		task_set_stop(Task * task);

#endif