6 // The thread does not autodelete by default.
7 // If autodelete is 1 the thread autodeletes.
8 // If it's synchronous the deletion occurs in join().
9 // If it's asynchronous the deletion occurs in entrypoint.
15 static void* entrypoint(void *parameters
);
17 virtual void run() = 0;
19 Thread(int synchronous
= 0, int realtime
= 0, int autodelete
= 0);
22 int end(pthread_t tid
); // end another thread
23 int end(); // end this thread
24 int cancel(); // end this thread
25 int join(); // join this thread
26 int suspend_thread(); // suspend this thread
27 int continue_thread(); // continue this thread
28 int exit_thread(); // exit this thread
31 int get_cancel_enabled();
32 int running(); // Return if thread is running
33 int set_synchronous(int value
);
34 int set_realtime(int value
= 1);
35 int set_autodelete(int value
);
37 // Return realtime variable
39 // Return 1 if querying the kernel returned a realtime policy
40 static int calculate_realtime();
41 int get_synchronous();
45 int synchronous
; // set to 1 to force join() to end
46 int realtime
; // set to 1 to schedule realtime
47 int autodelete
; // set to 1 to autodelete when run() finishes