radare2/libr/th/task.c
2010-12-13 00:49:33 +01:00

60 lines
859 B
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* radare - LGPL - Copyright 2010 pancake<nopcode.org> */
// XXX: Must be implemented
// Launch thread if requested
// Support multiple group of tasks (more than one core f.ex)
//
#include <r_types.h>
#define RTask int
#define MAXTASKS (sizeof (int))
static int tasks;
void int r_task_new(int t, int ) {
if (tasks & flags)
return -1;
tasks |= flags;
return flags;
}
R_API int r_task_wait(int t) {
}
R_API int r_task_step(int t) {
// check and lock if cant continue or stop if cancelled
}
R_API int r_task_stop(int t) {
}
R_API int r_task_pause() {
}
R_API int r_task_finish() {
}
R_API int r_task_check() {
}
#ifdef TEST
#define T_FLAGS 1
#define T_SEARCH 2
void task1() {
RTask t = r_task_new (foo1);
for (;;) {
if (!r_task_step (t) && !r_task_wait (t)) {
r_task_kill (t);
return;
}
}
}
int main() {
return 0;
}
#endif