From: Jaroslav Kysela Date: Tue, 6 Mar 2018 17:54:00 +0000 (+0100) Subject: remove LIST/TAILQ lists from tvheadend.h X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=333028e9ef2c3b3850d1fe68708fc53e00e1a537;p=thirdparty%2Ftvheadend.git remove LIST/TAILQ lists from tvheadend.h --- diff --git a/src/access.h b/src/access.h index bd15f3579..23fc768d8 100644 --- a/src/access.h +++ b/src/access.h @@ -150,6 +150,8 @@ typedef struct access_entry { struct access_ipmask_queue ae_ipmasks; } access_entry_t; +LIST_HEAD(access_entry_list, access_entry); + extern const idclass_t access_entry_class; typedef struct access { diff --git a/src/channels.h b/src/channels.h index 4ac2a2388..6e4d72ee4 100644 --- a/src/channels.h +++ b/src/channels.h @@ -43,7 +43,7 @@ typedef struct channel { idnode_t ch_id; - RB_ENTRY(channel) ch_link; + RB_ENTRY(channel) ch_link; int ch_refcount; int ch_load; @@ -82,9 +82,9 @@ typedef struct channel int ch_dvr_extra_time_pre; int ch_dvr_extra_time_post; int ch_epg_running; - struct dvr_entry_list ch_dvrs; - struct dvr_autorec_entry_list ch_autorecs; - struct dvr_timerec_entry_list ch_timerecs; + LIST_HEAD(, dvr_entry) ch_dvrs; + LIST_HEAD(, dvr_autorec_entry) ch_autorecs; + LIST_HEAD(, dvr_timerec_entry) ch_timerecs; } channel_t; @@ -109,7 +109,7 @@ typedef struct channel_tag { idnode_list_head_t ct_ctms; - struct dvr_autorec_entry_list ct_autorecs; + LIST_HEAD(, dvr_autorec_entry) ct_autorecs; idnode_list_head_t ct_accesses; diff --git a/src/descrambler/caclient.h b/src/descrambler/caclient.h index 68a5336e5..c9199ea0c 100644 --- a/src/descrambler/caclient.h +++ b/src/descrambler/caclient.h @@ -22,6 +22,7 @@ #include "tvheadend.h" #include "idnode.h" +struct service; struct mpegts_mux; extern const idclass_t caclient_class; diff --git a/src/dvr/dvr.h b/src/dvr/dvr.h index 8f555a8a3..398e7061c 100644 --- a/src/dvr/dvr.h +++ b/src/dvr/dvr.h @@ -28,6 +28,23 @@ #include "lang_str.h" #include "tvhvfs.h" +/** + * + */ +LIST_HEAD(dvr_config_list, dvr_config); +LIST_HEAD(dvr_entry_list, dvr_entry); + +LIST_HEAD(dvr_autorec_entry_list, dvr_autorec_entry); +LIST_HEAD(dvr_timerec_entry_list, dvr_timerec_entry); + +TAILQ_HEAD(dvr_autorec_entry_queue, dvr_autorec_entry); +TAILQ_HEAD(dvr_timerec_entry_queue, dvr_timerec_entry); + +LIST_HEAD(dvr_vfs_list, dvr_vfs); + +/** + * + */ #define DVR_MAX_DATA_ERRORS (10000) #define DVR_FILESIZE_UPDATE (1<<0) @@ -397,8 +414,6 @@ typedef struct dvr_autorec_entry { } dvr_autorec_entry_t; -TAILQ_HEAD(dvr_autorec_entry_queue, dvr_autorec_entry); - extern struct dvr_autorec_entry_queue autorec_entries; /** @@ -437,8 +452,6 @@ typedef struct dvr_timerec_entry { uint32_t dte_removal; } dvr_timerec_entry_t; -TAILQ_HEAD(dvr_timerec_entry_queue, dvr_timerec_entry); - extern struct dvr_timerec_entry_queue timerec_entries; /** @@ -828,5 +841,4 @@ void dvr_config_init(void); void dvr_done(void); - #endif /* DVR_H */ diff --git a/src/memoryinfo.h b/src/memoryinfo.h index f759a1637..d59c8a6a1 100644 --- a/src/memoryinfo.h +++ b/src/memoryinfo.h @@ -37,6 +37,8 @@ typedef struct memoryinfo { int64_t my_peak_count; } memoryinfo_t; +LIST_HEAD(memoryinfo_list, memoryinfo); + extern struct memoryinfo_list memoryinfo_entries; extern const idclass_t memoryinfo_class; diff --git a/src/packet.h b/src/packet.h index 25a3c0431..1911f3431 100644 --- a/src/packet.h +++ b/src/packet.h @@ -26,7 +26,6 @@ struct memoryinfo; /** * Packet buffer */ - typedef struct pktbuf { int pb_refcount; int pb_err; @@ -82,7 +81,6 @@ typedef struct th_pkt { } th_pkt_t; - /** * A packet reference */ @@ -91,6 +89,7 @@ typedef struct th_pktref { th_pkt_t *pr_pkt; } th_pktref_t; +TAILQ_HEAD(th_pktref_queue, th_pktref); /** * diff --git a/src/service.h b/src/service.h index d9c69363c..5e645b0ce 100644 --- a/src/service.h +++ b/src/service.h @@ -47,7 +47,11 @@ struct descramble_info; /** * */ +LIST_HEAD(th_descrambler_list, th_descrambler); typedef TAILQ_HEAD(service_instance_list, service_instance) service_instance_list_t; +LIST_HEAD(service_list, service); +RB_HEAD(service_tree, service); +TAILQ_HEAD(service_queue, service); /** * diff --git a/src/subscriptions.h b/src/subscriptions.h index 3ebc62a3d..1416f3747 100644 --- a/src/subscriptions.h +++ b/src/subscriptions.h @@ -147,6 +147,7 @@ typedef struct th_subscription { } th_subscription_t; +LIST_HEAD(th_subscription_list, th_subscription); /** * Prototypes diff --git a/src/tvheadend.h b/src/tvheadend.h index 310a0bc3c..36e27574d 100644 --- a/src/tvheadend.h +++ b/src/tvheadend.h @@ -230,29 +230,6 @@ tasklet_t *tasklet_arm_alloc(tsk_callback_t *callback, void *opaque); void tasklet_arm(tasklet_t *tsk, tsk_callback_t *callback, void *opaque); void tasklet_disarm(tasklet_t *gti); - -/* - * List / Queue header declarations - */ -LIST_HEAD(memoryinfo_list, memoryinfo); -LIST_HEAD(access_entry_list, access_entry); -LIST_HEAD(th_subscription_list, th_subscription); -LIST_HEAD(dvr_vfs_list, dvr_vfs); -LIST_HEAD(dvr_config_list, dvr_config); -LIST_HEAD(dvr_entry_list, dvr_entry); -TAILQ_HEAD(ref_update_queue, ref_update); -LIST_HEAD(service_list, service); -RB_HEAD(service_tree, service); -TAILQ_HEAD(service_queue, service); -LIST_HEAD(th_muxer_list, th_muxer); -LIST_HEAD(th_muxstream_list, th_muxstream); -LIST_HEAD(th_descrambler_list, th_descrambler); -TAILQ_HEAD(th_refpkt_queue, th_refpkt); -TAILQ_HEAD(th_muxpkt_queue, th_muxpkt); -LIST_HEAD(dvr_autorec_entry_list, dvr_autorec_entry); -LIST_HEAD(dvr_timerec_entry_list, dvr_timerec_entry); -TAILQ_HEAD(th_pktref_queue, th_pktref); - /** * */