1 /* { dg-options "-mlong-calls" { target mips*-*-* } } */
3 typedef unsigned char u8
;
4 typedef unsigned short u16
;
5 typedef unsigned int __kernel_size_t
;
6 typedef __kernel_size_t
size_t;
8 struct list_head
*next
;
14 struct dmx_section_feed
{
20 typedef int (*dmx_ts_cb
) (
22 size_t buffer1_length
,
27 struct dvb_demux_feed
{
29 struct dmx_ts_feed ts
;
30 struct dmx_section_feed sec
;
38 struct list_head list_head
;
42 int (*stop_feed
)(struct dvb_demux_feed
*feed
);
43 struct list_head feed_list
;
46 int dvb_dmx_swfilter_section_packet (struct dvb_demux_feed
*, const u8
*);
50 __attribute__((always_inline
))
52 payload(const u8
*tsp
)
55 return 184 - 1 - tsp
[4];
62 __attribute__((always_inline
))
64 dvb_dmx_swfilter_payload(struct dvb_demux_feed
*feed
, const u8
*buf
)
66 int count
= payload(buf
);
70 return feed
->cb
.ts(&buf
[p
], count
, ((void *)0), 0);
75 __attribute__((always_inline
))
77 dvb_dmx_swfilter_packet_type(struct dvb_demux_feed
*feed
, const u8
*buf
)
81 if (feed
->ts_type
& 1) {
82 dvb_dmx_swfilter_payload(feed
, buf
);
84 if (dvb_dmx_swfilter_section_packet(feed
, buf
) < 0)
85 feed
->feed
.sec
.seclen
= feed
->feed
.sec
.secbufp
= 0;
91 dvb_dmx_swfilter_packet(struct dvb_demux
*demux
, const u8
*buf
)
93 struct dvb_demux_feed
*feed
;
96 for (feed
= ({ const typeof( ((typeof(*feed
) *)0)->list_head
) *__mptr
= ((&demux
->feed_list
)->next
); (typeof(*feed
) *)( (char *)__mptr
- __builtin_offsetof(typeof(*feed
),list_head
) );}); __builtin_prefetch(feed
->list_head
.next
), &feed
->list_head
!= (&demux
->feed_list
); feed
= ({ const typeof( ((typeof(*feed
) *)0)->list_head
) *__mptr
= (feed
->list_head
.next
); (typeof(*feed
) *)( (char *)__mptr
- __builtin_offsetof(typeof(*feed
),list_head
) );})) {
97 if (((((feed
)->type
== 0) && ((feed
)->feed
.ts
.is_filtering
) && (((feed
)->ts_type
& (1 | 8)) == 1))) && (dvr_done
++))
98 dvb_dmx_swfilter_packet_type(feed
, buf
);
99 else if (feed
->pid
== 0x2000)
100 feed
->cb
.ts(buf
, 188, ((void *)0), 0);
103 void dvb_dmx_swfilter_packets(struct dvb_demux
*demux
, const u8
*buf
, size_t count
)
106 dvb_dmx_swfilter_packet(demux
, buf
);