Subversion Repositories shark

Rev

Rev 1063 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
352 giacomo 1
/*
2
 * Project: S.Ha.R.K.
3
 *
4
 * Coordinators:
5
 *   Giorgio Buttazzo    <giorgio@sssup.it>
6
 *   Paolo Gai           <pj@gandalf.sssup.it>
7
 *
8
 * Authors     :
9
 *   Massimiliano Giorgi <massy@gandalf.sssup.it>
10
 *   (see the web pages for full authors list)
11
 *
12
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
13
 *
14
 * http://www.sssup.it
15
 * http://retis.sssup.it
16
 * http://shark.sssup.it
17
 */
18
 
1063 tullio 19
/*
20
 * This program is free software; you can redistribute it and/or modify
21
 * it under the terms of the GNU General Public License as published by
22
 * the Free Software Foundation; either version 2 of the License, or
23
 * (at your option) any later version.
24
 *
25
 * This program is distributed in the hope that it will be useful,
26
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28
 * GNU General Public License for more details.
29
 *
30
 * You should have received a copy of the GNU General Public License
31
 * along with this program; if not, write to the Free Software
32
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
33
 *
34
 */
35
 
352 giacomo 36
#include <ll/sys/types.h>
37
#include <ll/stdlib.h>
38
 
39
#include <kernel/log.h>
40
 
41
#include <types.h>
42
#include <trace.h>
43
#include <queues.h>
44
 
45
static trc_event_t *dummy_queue_get(void *unused)
46
{
47
  static trc_event_t event;
48
  return &event;
49
}
50
 
51
static int dummy_queue_post(void *unused)
52
{
53
  return 0;
54
}
55
 
56
static int create_dummy_queue(trc_queue_t *queue, void *unused)
57
{
58
  queue->get=dummy_queue_get;
59
  queue->post=dummy_queue_post;
60
  queue->data=NULL;
61
  return 0;
62
}
63
 
64
static int terminate_dummy_queue(void *unused)
65
{
66
  return 0;
67
}
68
 
69
static int activate_dummy_queue(void *unused, int unused2)
70
{
71
  return 0;
72
}
73
 
74
int trc_register_dummy_queue(void)
75
{
76
  int res;
77
  res=trc_register_queuetype(TRC_DUMMY_QUEUE,
78
                             create_dummy_queue,
79
                             activate_dummy_queue,
80
                             terminate_dummy_queue);
81
  if (res!=0) printk(KERN_WARNING "can't register tracer dummy queue");
82
  return res;
83
}