2 * Copyright Droids Corporation (2009)
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 * Revision : $Id: scheduler_stats.h,v 1.1.2.1 2009-11-08 17:33:14 zer0 Exp $
20 * Olivier MATZ <zer0@droids-corp.org>
23 #ifndef _SCHEDULER_STATS_H_
24 #define _SCHEDULER_STATS_H_
26 #ifdef CONFIG_MODULE_SCHEDULER_STATS
27 struct scheduler_stats {
31 uint32_t max_stacking;
32 uint32_t task_delayed[SCHEDULER_NB_MAX_EVENT];
33 uint32_t task_scheduled[SCHEDULER_NB_MAX_EVENT];
36 extern struct scheduler_stats sched_stats;
38 #define SCHED_INC_STAT(x) do { \
45 #define SCHED_INC_STAT2(x, i) do { \
53 #else /* CONFIG_MODULE_SCHEDULER_STATS */
55 #define SCHED_INC_STAT(x) do { } while(0)
56 #define SCHED_INC_STAT2(x, i) do { } while(0)
58 #endif /* CONFIG_MODULE_SCHEDULER_STATS */
60 void scheduler_stats_dump(void);
62 #endif /* _SCHEDULER_STATS_H_ */