00001 /*-------------------------------------------------------------------- 00002 * 00003 * (C) Copyright Koninklijke Philips Electronics NV 2006. 00004 * All rights reserved. This software is licensed under the terms of 00005 * version 2.1 of the GNU Lesser General Public License as published 00006 * by the Free Software Foundation. For licensing and warranty 00007 * information, see the file COPYING in the main directory. 00008 * 00009 *------------------------------------------------------------------*/ 00010 00011 #ifndef TRTTASK_H 00012 #define TRTTASK_H 00013 00014 #include "ostask.h" 00015 #include "trt.h" 00016 00017 const int STACKSIZE = 64*1024; 00018 00019 class trtTask : public osTask 00020 { 00021 public: 00022 trtTask(void (*f)(void*), void *a, int s=STACKSIZE); 00023 ~trtTask(); 00024 00025 void start(); 00026 void exit(); 00027 void join(); 00028 void kill(); 00029 00030 private: 00031 void (*func)(void*); 00032 void* args; 00033 int stackSize; 00034 00035 thread_t pr; 00036 00037 friend int run_trt_task(int); 00038 }; 00039 00040 #endif