utcb_watch.h

Go to the documentation of this file.
00001 /*!
00002  * \file   cpu_reserve/include/utcb_watch.h
00003  * \brief  Watch threads using the ring-buffer in their UTCB
00004  *
00005  * \date   01/12/2005
00006  * \author Jork Loeser <jork.loeser@inf.tu-dresden.de>
00007  *
00008  * Using a special Fiasco extension, scheduling events of threads will
00009  * be written into the UTCBs of those threads. Using an additional polling
00010  * thread, the data will be collected and written into rt_mon histogramms.
00011  */
00012 /* (c) 2005 Technische Universitaet Dresden
00013  * This file is part of DROPS, which is distributed under the terms of the
00014  * GNU General Public License 2. Please see the COPYING file for details.
00015  */
00016 #ifndef __CPU_RESERVE_INCLUDE_UTCB_WATCH_H_
00017 #define __CPU_RESERVE_INCLUDE_UTCB_WATCH_H_
00018 
00019 #include <l4/cpu_reserve/utcb_stat.h>
00020 #include <l4/sys/compiler.h>
00021 
00022 EXTERN_C_BEGIN
00023 
00024 #define L4CPU_RESERVE_UTCB_NAME_LEN 32
00025 
00026 /*!\brief Initialize watching threads using the utcb rings
00027  *
00028  * \param poll_interval         poll interval, in microseconds
00029  *
00030  * \retval 0                    OK, error else
00031  */
00032 int l4cpu_reserve_utcb_watch_init(int polltime);
00033 
00034 /*!\brief Add a thread to the watched threads
00035  *
00036  * \param  thread               thread to be watched
00037  * \param  utcb                 pointer to the utcb of that thread
00038  * \param  name                 name of the thread/watch entity
00039  * \param  ts_count             maximum number of timeslices to watch
00040  *                              (incl. the be-timeslice)
00041  * \retval 0                    OK, error else
00042  */
00043 int l4cpu_reserve_utcb_watch_add(l4_threadid_t thread,
00044                                  l4cpu_reserve_utcb_t *utcb,
00045                                  const char*name,
00046                                  unsigned maxtime,
00047                                  int ts_count);
00048 
00049 /*!\brief Stop watching of a thread
00050  *
00051  * \param  thread               thread that is not to be watched any longer
00052  *
00053  * \retval 0                    OK, error else
00054  */
00055 int l4cpu_reserve_utcb_watch_del(const l4cpu_reserve_utcb_t *utcb);
00056 
00057 EXTERN_C_END
00058 #endif

CPU reservation server Reference Manual, written by Jork Loeser  © 2004