Xenomai 3.3.2
Loading...
Searching...
No Matches
rtcan_list.h
1/*
2 * List management for the RTDM RTCAN device driver
3 *
4 * Copyright (C) 2005,2006 Sebastian Smolorz
5 * <Sebastian.Smolorz@stud.uni-hannover.de>
6 *
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 */
22
23#ifndef __RTCAN_LIST_H_
24#define __RTCAN_LIST_H_
25
26#include "rtcan_socket.h"
27
28
29/*
30 * List element in a single linked list used for registering reception sockets.
31 * Every single struct can_filter which was bound to a socket gets such a
32 * list entry. There is no member for the CAN interface because there is one
33 * reception list for every CAN controller. This is because when a CAN message
34 * is received it is clear from which interface and therefore minimizes
35 * searching time.
36 */
37struct rtcan_recv {
38 can_filter_t can_filter; /* filter used for deciding if
39 * a socket wants to get a CAN
40 * message */
41 unsigned int match_count; /* count accepted messages */
42 struct rtcan_socket *sock; /* pointer to registered socket
43 */
44 struct rtcan_recv *next; /* pointer to next list element
45 */
46};
47
48
49/*
50 * Element in a TX wait queue.
51 *
52 * Every socket holds a TX wait queue where all RT tasks are queued when they
53 * are blocked while waiting to be able to transmit a message via this socket.
54 *
55 * Every sender holds its own element.
56 */
57struct tx_wait_queue {
58 struct list_head tx_wait_list; /* List pointers */
59 rtdm_task_t *rt_task; /* Pointer to task handle */
60};
61
62
63/* Spinlock for all reception lists and also for some members in
64 * struct rtcan_socket */
65extern rtdm_lock_t rtcan_recv_list_lock;
66
67
68#endif /* __RTCAN_LIST_H_ */
pipeline_spinlock_t rtdm_lock_t
Lock variable.
Definition driver.h:552
Filter for reception of CAN messages.
Definition can.h:287