Rev 1063 | Go to most recent revision | Details | 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 | |||
19 | #include <ll/sys/types.h> |
||
20 | #include <ll/stdlib.h> |
||
21 | |||
22 | #include <kernel/log.h> |
||
23 | |||
24 | #include <types.h> |
||
25 | #include <trace.h> |
||
26 | #include <queues.h> |
||
27 | |||
28 | static trc_event_t *dummy_queue_get(void *unused) |
||
29 | { |
||
30 | static trc_event_t event; |
||
31 | return &event; |
||
32 | } |
||
33 | |||
34 | static int dummy_queue_post(void *unused) |
||
35 | { |
||
36 | return 0; |
||
37 | } |
||
38 | |||
39 | static int create_dummy_queue(trc_queue_t *queue, void *unused) |
||
40 | { |
||
41 | queue->get=dummy_queue_get; |
||
42 | queue->post=dummy_queue_post; |
||
43 | queue->data=NULL; |
||
44 | return 0; |
||
45 | } |
||
46 | |||
47 | static int terminate_dummy_queue(void *unused) |
||
48 | { |
||
49 | return 0; |
||
50 | } |
||
51 | |||
52 | static int activate_dummy_queue(void *unused, int unused2) |
||
53 | { |
||
54 | return 0; |
||
55 | } |
||
56 | |||
57 | int trc_register_dummy_queue(void) |
||
58 | { |
||
59 | int res; |
||
60 | res=trc_register_queuetype(TRC_DUMMY_QUEUE, |
||
61 | create_dummy_queue, |
||
62 | activate_dummy_queue, |
||
63 | terminate_dummy_queue); |
||
64 | if (res!=0) printk(KERN_WARNING "can't register tracer dummy queue"); |
||
65 | return res; |
||
66 | } |