From 309745780ec69f4bd551ebc0547a7a8796f0f961 Mon Sep 17 00:00:00 2001 From: Niclas Finne Date: Wed, 21 Feb 2018 01:14:10 +0100 Subject: [PATCH] Removed the remaining Contiki Interface declaration macros (CCIF/CLIF) --- arch/cpu/arm/arm-def.h | 10 ---------- arch/cpu/cc2538/clock.c | 4 ++-- arch/cpu/cc26xx-cc13xx/clock.c | 4 ++-- arch/cpu/msp430/msp430-def.h | 3 --- arch/cpu/nrf52832/dev/clock.c | 4 ++-- arch/platform/cooja/contiki-conf.h | 3 --- arch/platform/jn516x/jn516x-def.h | 3 --- arch/platform/native/contiki-conf.h | 3 --- os/net/ipv6/resolv.h | 10 +++++----- os/net/ipv6/tcpip.h | 23 +++++++++++----------- os/net/ipv6/uip.h | 30 ++++++++++++++--------------- os/net/ipv6/uiplib.h | 4 ++-- os/storage/cfs/cfs.h | 18 ++++++++--------- os/sys/autostart.h | 2 +- os/sys/clock.h | 4 ++-- os/sys/etimer.h | 6 +++--- os/sys/process.h | 20 +++++++++---------- os/sys/timer.h | 4 ++-- tools/wpcapslip/contiki-conf.h | 2 -- 19 files changed, 66 insertions(+), 91 deletions(-) diff --git a/arch/cpu/arm/arm-def.h b/arch/cpu/arm/arm-def.h index 63a70a535..2cd31604c 100644 --- a/arch/cpu/arm/arm-def.h +++ b/arch/cpu/arm/arm-def.h @@ -42,16 +42,6 @@ /*---------------------------------------------------------------------------*/ #include /*---------------------------------------------------------------------------*/ -/** - * \name Compiler configuration - * - * Those values are not meant to be modified by the user - * @{ - */ -#define CCIF -#define CLIF -/** @} */ -/*---------------------------------------------------------------------------*/ /** * \name Macros and typedefs * diff --git a/arch/cpu/cc2538/clock.c b/arch/cpu/cc2538/clock.c index 2842a3be8..839c72242 100644 --- a/arch/cpu/cc2538/clock.c +++ b/arch/cpu/cc2538/clock.c @@ -114,7 +114,7 @@ clock_init(void) REG(GPT_0_BASE + GPTIMER_TAPR) = PRESCALER_VALUE; } /*---------------------------------------------------------------------------*/ -CCIF clock_time_t +clock_time_t clock_time(void) { return rt_ticks_startup / RTIMER_CLOCK_TICK_RATIO; @@ -126,7 +126,7 @@ clock_set_seconds(unsigned long sec) rt_ticks_epoch = (uint64_t)sec * RTIMER_SECOND; } /*---------------------------------------------------------------------------*/ -CCIF unsigned long +unsigned long clock_seconds(void) { return rt_ticks_epoch / RTIMER_SECOND; diff --git a/arch/cpu/cc26xx-cc13xx/clock.c b/arch/cpu/cc26xx-cc13xx/clock.c index 981bbb4b2..172d1c3fd 100644 --- a/arch/cpu/cc26xx-cc13xx/clock.c +++ b/arch/cpu/cc26xx-cc13xx/clock.c @@ -124,7 +124,7 @@ update_clock_variable(void) count = (aon_rtc_secs_now * CLOCK_SECOND) + (aon_rtc_ticks_now >> 9); } /*---------------------------------------------------------------------------*/ -CCIF clock_time_t +clock_time_t clock_time(void) { update_clock_variable(); @@ -142,7 +142,7 @@ clock_update(void) } } /*---------------------------------------------------------------------------*/ -CCIF unsigned long +unsigned long clock_seconds(void) { bool interrupts_disabled; diff --git a/arch/cpu/msp430/msp430-def.h b/arch/cpu/msp430/msp430-def.h index 2f14d7236..93e575702 100644 --- a/arch/cpu/msp430/msp430-def.h +++ b/arch/cpu/msp430/msp430-def.h @@ -79,9 +79,6 @@ typedef long off_t; /* Our clock resolution, this is the same as Unix HZ. */ #define CLOCK_CONF_SECOND 128UL -#define CCIF -#define CLIF - typedef int spl_t; spl_t splhigh_(void); diff --git a/arch/cpu/nrf52832/dev/clock.c b/arch/cpu/nrf52832/dev/clock.c index 68413c23b..496668ecb 100644 --- a/arch/cpu/nrf52832/dev/clock.c +++ b/arch/cpu/nrf52832/dev/clock.c @@ -116,7 +116,7 @@ clock_init(void) rtc_config(); } /*---------------------------------------------------------------------------*/ -CCIF clock_time_t +clock_time_t clock_time(void) { return (clock_time_t)(ticks & 0xFFFFFFFF); @@ -131,7 +131,7 @@ clock_update(void) } } /*---------------------------------------------------------------------------*/ -CCIF unsigned long +unsigned long clock_seconds(void) { return (unsigned long)ticks/CLOCK_CONF_SECOND; diff --git a/arch/platform/cooja/contiki-conf.h b/arch/platform/cooja/contiki-conf.h index af7582ab9..4a8e17c64 100644 --- a/arch/platform/cooja/contiki-conf.h +++ b/arch/platform/cooja/contiki-conf.h @@ -98,9 +98,6 @@ #define CC_CONF_VA_ARGS 1 #define CC_CONF_INLINE inline -#define CCIF -#define CLIF - /* These names are deprecated, use C99 names. */ #include typedef uint8_t u8_t; diff --git a/arch/platform/jn516x/jn516x-def.h b/arch/platform/jn516x/jn516x-def.h index 4861d00b3..2526d2698 100644 --- a/arch/platform/jn516x/jn516x-def.h +++ b/arch/platform/jn516x/jn516x-def.h @@ -217,9 +217,6 @@ typedef uint32_t rtimer_clock_t; #define CC_CONF_VA_ARGS 1 #define CC_CONF_INLINE inline -#define CCIF -#define CLIF - #ifdef HAVE_STDINT_H #include #else diff --git a/arch/platform/native/contiki-conf.h b/arch/platform/native/contiki-conf.h index 3a0329a82..eef8b0a83 100644 --- a/arch/platform/native/contiki-conf.h +++ b/arch/platform/native/contiki-conf.h @@ -58,9 +58,6 @@ int select_set_callback(int fd, const struct select_callback *callback); #define EEPROM_CONF_SIZE 1024 #endif -#define CCIF -#define CLIF - /* These names are deprecated, use C99 names. */ typedef uint8_t u8_t; typedef uint16_t u16_t; diff --git a/os/net/ipv6/resolv.h b/os/net/ipv6/resolv.h index ed24d5bce..ac414425f 100644 --- a/os/net/ipv6/resolv.h +++ b/os/net/ipv6/resolv.h @@ -55,7 +55,7 @@ /** * Event that is broadcasted when a DNS name has been resolved. */ -CCIF extern process_event_t resolv_event_found; +extern process_event_t resolv_event_found; enum { /** Hostname is fresh and usable. This response is cached and will eventually @@ -91,14 +91,14 @@ enum { typedef uint8_t resolv_status_t; /* Functions. */ -CCIF resolv_status_t resolv_lookup(const char *name, uip_ipaddr_t ** ipaddr); +resolv_status_t resolv_lookup(const char *name, uip_ipaddr_t ** ipaddr); -CCIF void resolv_query(const char *name); +void resolv_query(const char *name); #if RESOLV_CONF_SUPPORTS_MDNS -CCIF void resolv_set_hostname(const char *hostname); +void resolv_set_hostname(const char *hostname); -CCIF const char *resolv_get_hostname(void); +const char *resolv_get_hostname(void); #endif PROCESS_NAME(resolv_process); diff --git a/os/net/ipv6/tcpip.h b/os/net/ipv6/tcpip.h index bf8c9b0b1..8f84cedb3 100644 --- a/os/net/ipv6/tcpip.h +++ b/os/net/ipv6/tcpip.h @@ -108,8 +108,7 @@ void tcpip_uipcall(void); * process whenever an event occurs on the connection. * */ -CCIF void tcp_attach(struct uip_conn *conn, - void *appstate); +void tcp_attach(struct uip_conn *conn, void *appstate); #define tcp_markconn(conn, appstate) tcp_attach(conn, appstate) /** @@ -126,7 +125,7 @@ CCIF void tcp_attach(struct uip_conn *conn, * \param port The port number in network byte order. * */ -CCIF void tcp_listen(uint16_t port); +void tcp_listen(uint16_t port); /** * Close a listening TCP port. @@ -140,7 +139,7 @@ CCIF void tcp_listen(uint16_t port); * \param port The port number in network byte order. * */ -CCIF void tcp_unlisten(uint16_t port); +void tcp_unlisten(uint16_t port); /** * Open a TCP connection to the specified IP address and port. @@ -165,8 +164,8 @@ CCIF void tcp_unlisten(uint16_t port); * memory could not be allocated for the connection. * */ -CCIF struct uip_conn *tcp_connect(const uip_ipaddr_t *ripaddr, uint16_t port, - void *appstate); +struct uip_conn *tcp_connect(const uip_ipaddr_t *ripaddr, uint16_t port, + void *appstate); /** * Cause a specified TCP connection to be polled. @@ -226,8 +225,8 @@ void udp_attach(struct uip_udp_conn *conn, * \return A pointer to the newly created connection, or NULL if * memory could not be allocated for the connection. */ -CCIF struct uip_udp_conn *udp_new(const uip_ipaddr_t *ripaddr, uint16_t port, - void *appstate); +struct uip_udp_conn *udp_new(const uip_ipaddr_t *ripaddr, uint16_t port, + void *appstate); /** * Create a new UDP broadcast connection. @@ -272,7 +271,7 @@ struct uip_udp_conn *udp_broadcast_new(uint16_t port, void *appstate); * \param conn A pointer to the UDP connection that should be polled. * */ -CCIF void tcpip_poll_udp(struct uip_udp_conn *conn); +void tcpip_poll_udp(struct uip_udp_conn *conn); /** @} */ @@ -288,7 +287,7 @@ CCIF void tcpip_poll_udp(struct uip_udp_conn *conn); * * This event is posted to a process whenever a uIP ICMP event has occurred. */ -CCIF extern process_event_t tcpip_icmp6_event; +extern process_event_t tcpip_icmp6_event; /** * \brief register an ICMPv6 callback @@ -318,7 +317,7 @@ void tcpip_icmp6_call(uint8_t type); * * This event is posted to a process whenever a uIP event has occurred. */ -CCIF extern process_event_t tcpip_event; +extern process_event_t tcpip_event; /** @@ -335,7 +334,7 @@ CCIF extern process_event_t tcpip_event; * and the length of the packet must be in the global * uip_len variable. */ -CCIF void tcpip_input(void); +void tcpip_input(void); /** * \brief Output packet to layer 2 diff --git a/os/net/ipv6/uip.h b/os/net/ipv6/uip.h index c3c9f2b38..7751b8fc3 100755 --- a/os/net/ipv6/uip.h +++ b/os/net/ipv6/uip.h @@ -500,7 +500,7 @@ typedef union { uint8_t u8[UIP_BUFSIZE]; } uip_buf_t; -CCIF extern uip_buf_t uip_aligned_buf; +extern uip_buf_t uip_aligned_buf; /** Macro to access uip_aligned_buf as an array of bytes */ #define uip_buf (uip_aligned_buf.u8) @@ -620,7 +620,7 @@ struct uip_conn *uip_connect(const uip_ipaddr_t *ripaddr, uint16_t port); * * \hideinitializer */ -CCIF void uip_send(const void *data, int len); +void uip_send(const void *data, int len); /** * The length of any incoming data that is currently available (if available) @@ -1238,14 +1238,14 @@ struct uip_udp_conn *uip_udp_new(const uip_ipaddr_t *ripaddr, uint16_t rport); * network byte order, use the UIP_HTONS() macro instead. */ #ifndef uip_htons -CCIF uint16_t uip_htons(uint16_t val); +uint16_t uip_htons(uint16_t val); #endif /* uip_htons */ #ifndef uip_ntohs #define uip_ntohs uip_htons #endif #ifndef uip_htonl -CCIF uint32_t uip_htonl(uint32_t val); +uint32_t uip_htonl(uint32_t val); #endif /* uip_htonl */ #ifndef uip_ntohl #define uip_ntohl uip_htonl @@ -1260,7 +1260,7 @@ CCIF uint32_t uip_htonl(uint32_t val); * called. If the application wishes to send data, the application may * use this space to write the data into before calling uip_send(). */ -CCIF extern void *uip_appdata; +extern void *uip_appdata; #if UIP_URGDATA > 0 /* uint8_t *uip_urgdata: @@ -1295,7 +1295,7 @@ extern void *uip_urgdata; * packet. * */ -CCIF extern uint16_t uip_len; +extern uint16_t uip_len; /** * The length of the extension headers @@ -1367,10 +1367,10 @@ struct uip_conn { * connection. */ -CCIF extern struct uip_conn *uip_conn; +extern struct uip_conn *uip_conn; #if UIP_TCP /* The array containing all uIP connections. */ -CCIF extern struct uip_conn uip_conns[UIP_TCP_CONNS]; +extern struct uip_conn uip_conns[UIP_TCP_CONNS]; #endif /** @@ -1522,7 +1522,7 @@ struct uip_eth_hdr { * that are defined in this file. Please read below for more * information. */ -CCIF extern uint8_t uip_flags; +extern uint8_t uip_flags; /* The following flags may be set in the global variable uip_flags before calling the application callback. The UIP_ACKDATA, @@ -1934,17 +1934,17 @@ struct uip_udp_hdr { #if UIP_FIXEDADDR -CCIF extern const uip_ipaddr_t uip_hostaddr, uip_netmask, uip_draddr; +extern const uip_ipaddr_t uip_hostaddr, uip_netmask, uip_draddr; #else /* UIP_FIXEDADDR */ -CCIF extern uip_ipaddr_t uip_hostaddr, uip_netmask, uip_draddr; +extern uip_ipaddr_t uip_hostaddr, uip_netmask, uip_draddr; #endif /* UIP_FIXEDADDR */ -CCIF extern const uip_ipaddr_t uip_broadcast_addr; -CCIF extern const uip_ipaddr_t uip_all_zeroes_addr; +extern const uip_ipaddr_t uip_broadcast_addr; +extern const uip_ipaddr_t uip_all_zeroes_addr; #if UIP_FIXEDETHADDR -CCIF extern const uip_lladdr_t uip_lladdr; +extern const uip_lladdr_t uip_lladdr; #else -CCIF extern uip_lladdr_t uip_lladdr; +extern uip_lladdr_t uip_lladdr; #endif diff --git a/os/net/ipv6/uiplib.h b/os/net/ipv6/uiplib.h index 6b0d4ac84..6a122033e 100644 --- a/os/net/ipv6/uiplib.h +++ b/os/net/ipv6/uiplib.h @@ -73,8 +73,8 @@ #define uiplib_ipaddrconv uiplib_ip4addrconv #endif /* NETSTACK_CONF_WITH_IPV6 */ -CCIF int uiplib_ip4addrconv(const char *addrstr, uip_ip4addr_t *addr); -CCIF int uiplib_ip6addrconv(const char *addrstr, uip_ip6addr_t *addr); +int uiplib_ip4addrconv(const char *addrstr, uip_ip4addr_t *addr); +int uiplib_ip6addrconv(const char *addrstr, uip_ip6addr_t *addr); /** @} */ /** diff --git a/os/storage/cfs/cfs.h b/os/storage/cfs/cfs.h index 3e2452c61..4851f562a 100644 --- a/os/storage/cfs/cfs.h +++ b/os/storage/cfs/cfs.h @@ -166,7 +166,7 @@ struct cfs_dirent { * \sa cfs_close() */ #ifndef cfs_open -CCIF int cfs_open(const char *name, int flags); +int cfs_open(const char *name, int flags); #endif /** @@ -177,7 +177,7 @@ CCIF int cfs_open(const char *name, int flags); * opened with cfs_open(). */ #ifndef cfs_close -CCIF void cfs_close(int fd); +void cfs_close(int fd); #endif /** @@ -192,7 +192,7 @@ CCIF void cfs_close(int fd); * cfs_open() and the CFS_READ flag. */ #ifndef cfs_read -CCIF int cfs_read(int fd, void *buf, unsigned int len); +int cfs_read(int fd, void *buf, unsigned int len); #endif /** @@ -207,7 +207,7 @@ CCIF int cfs_read(int fd, void *buf, unsigned int len); * cfs_open() and the CFS_WRITE flag. */ #ifndef cfs_write -CCIF int cfs_write(int fd, const void *buf, unsigned int len); +int cfs_write(int fd, const void *buf, unsigned int len); #endif /** @@ -228,7 +228,7 @@ CCIF int cfs_write(int fd, const void *buf, unsigned int len); * \sa CFS_SEEK_SET */ #ifndef cfs_seek -CCIF cfs_offset_t cfs_seek(int fd, cfs_offset_t offset, int whence); +cfs_offset_t cfs_seek(int fd, cfs_offset_t offset, int whence); #endif /** @@ -238,7 +238,7 @@ CCIF cfs_offset_t cfs_seek(int fd, cfs_offset_t offset, int whence); * \return -1 If the file could not be removed or if it doesn't exist. */ #ifndef cfs_remove -CCIF int cfs_remove(const char *name); +int cfs_remove(const char *name); #endif /** @@ -251,7 +251,7 @@ CCIF int cfs_remove(const char *name); * \sa cfs_closedir() */ #ifndef cfs_opendir -CCIF int cfs_opendir(struct cfs_dir *dirp, const char *name); +int cfs_opendir(struct cfs_dir *dirp, const char *name); #endif /** @@ -265,7 +265,7 @@ CCIF int cfs_opendir(struct cfs_dir *dirp, const char *name); * \sa cfs_closedir() */ #ifndef cfs_readdir -CCIF int cfs_readdir(struct cfs_dir *dirp, struct cfs_dirent *dirent); +int cfs_readdir(struct cfs_dir *dirp, struct cfs_dirent *dirent); #endif /** @@ -276,7 +276,7 @@ CCIF int cfs_readdir(struct cfs_dir *dirp, struct cfs_dirent *dirent); * \sa cfs_readdir() */ #ifndef cfs_closedir -CCIF void cfs_closedir(struct cfs_dir *dirp); +void cfs_closedir(struct cfs_dir *dirp); #endif #endif /* CFS_H_ */ diff --git a/os/sys/autostart.h b/os/sys/autostart.h index 8a671b363..dcf91c4ef 100644 --- a/os/sys/autostart.h +++ b/os/sys/autostart.h @@ -50,7 +50,7 @@ struct process * const autostart_processes[] = {__VA_ARGS__, NULL} #error "C compiler must support __VA_ARGS__ macro" #endif -CLIF extern struct process * const autostart_processes[]; +extern struct process * const autostart_processes[]; void autostart_start(struct process * const processes[]); void autostart_exit(struct process * const processes[]); diff --git a/os/sys/clock.h b/os/sys/clock.h index 3aa25b22c..161527d47 100644 --- a/os/sys/clock.h +++ b/os/sys/clock.h @@ -98,7 +98,7 @@ void clock_init(void); * * \return The current clock time, measured in system ticks. */ -CCIF clock_time_t clock_time(void); +clock_time_t clock_time(void); /** * Get the current value of the platform seconds. @@ -108,7 +108,7 @@ CCIF clock_time_t clock_time(void); * * \return The value. */ -CCIF unsigned long clock_seconds(void); +unsigned long clock_seconds(void); /** * Set the value of the platform seconds. diff --git a/os/sys/etimer.h b/os/sys/etimer.h index 59f665d10..02ad5df11 100644 --- a/os/sys/etimer.h +++ b/os/sys/etimer.h @@ -94,7 +94,7 @@ struct etimer { * process that called the etimer_set() function. * */ -CCIF void etimer_set(struct etimer *et, clock_time_t interval); +void etimer_set(struct etimer *et, clock_time_t interval); /** * \brief Reset an event timer with the same interval as was @@ -111,7 +111,7 @@ CCIF void etimer_set(struct etimer *et, clock_time_t interval); * * \sa etimer_restart() */ -CCIF void etimer_reset(struct etimer *et); +void etimer_reset(struct etimer *et); /** * \brief Reset an event timer with a new interval. @@ -192,7 +192,7 @@ clock_time_t etimer_start_time(struct etimer *et); * This function tests if an event timer has expired and * returns true or false depending on its status. */ -CCIF int etimer_expired(struct etimer *et); +int etimer_expired(struct etimer *et); /** * \brief Stop a pending event timer. diff --git a/os/sys/process.h b/os/sys/process.h index bd206b6e7..5cffdb526 100644 --- a/os/sys/process.h +++ b/os/sys/process.h @@ -339,7 +339,7 @@ struct process { * process * */ -CCIF void process_start(struct process *p, process_data_t data); +void process_start(struct process *p, process_data_t data); /** * Post an asynchronous event. @@ -362,7 +362,7 @@ CCIF void process_start(struct process *p, process_data_t data); * \retval PROCESS_ERR_FULL The event queue was full and the event could * not be posted. */ -CCIF int process_post(struct process *p, process_event_t ev, process_data_t data); +int process_post(struct process *p, process_event_t ev, process_data_t data); /** * Post a synchronous event to a process. @@ -374,8 +374,8 @@ CCIF int process_post(struct process *p, process_event_t ev, process_data_t data * \param data A pointer to additional data that is posted together * with the event. */ -CCIF void process_post_synch(struct process *p, - process_event_t ev, process_data_t data); +void process_post_synch(struct process *p, + process_event_t ev, process_data_t data); /** * \brief Cause a process to exit @@ -387,7 +387,7 @@ CCIF void process_post_synch(struct process *p, * * \sa PROCESS_CURRENT() */ -CCIF void process_exit(struct process *p); +void process_exit(struct process *p); /** @@ -400,7 +400,7 @@ CCIF void process_exit(struct process *p); * \hideinitializer */ #define PROCESS_CURRENT() process_current -CCIF extern struct process *process_current; +extern struct process *process_current; /** * Switch context to another process @@ -450,7 +450,7 @@ process_current = p * \note There currently is no way to deallocate an allocated event * number. */ -CCIF process_event_t process_alloc_event(void); +process_event_t process_alloc_event(void); /** @} */ @@ -467,7 +467,7 @@ CCIF process_event_t process_alloc_event(void); * * \param p A pointer to the process' process structure. */ -CCIF void process_poll(struct process *p); +void process_poll(struct process *p); /** @} */ @@ -509,7 +509,7 @@ int process_run(void); * \retval Non-zero if the process is running. * \retval Zero if the process is not running. */ -CCIF int process_is_running(struct process *p); +int process_is_running(struct process *p); /** * Number of events waiting to be processed. @@ -521,7 +521,7 @@ int process_nevents(void); /** @} */ -CCIF extern struct process *process_list; +extern struct process *process_list; #define PROCESS_LIST() process_list diff --git a/os/sys/timer.h b/os/sys/timer.h index b05963e47..54abcb3c2 100644 --- a/os/sys/timer.h +++ b/os/sys/timer.h @@ -84,10 +84,10 @@ struct timer { clock_time_t interval; }; -CCIF void timer_set(struct timer *t, clock_time_t interval); +void timer_set(struct timer *t, clock_time_t interval); void timer_reset(struct timer *t); void timer_restart(struct timer *t); -CCIF int timer_expired(struct timer *t); +int timer_expired(struct timer *t); clock_time_t timer_remaining(struct timer *t); diff --git a/tools/wpcapslip/contiki-conf.h b/tools/wpcapslip/contiki-conf.h index 020cbdfec..7221f4033 100644 --- a/tools/wpcapslip/contiki-conf.h +++ b/tools/wpcapslip/contiki-conf.h @@ -1,8 +1,6 @@ #ifndef CONTIKI_CONF_H_ #define CONTIKI_CONF_H_ #include -#define CCIF -#define CLIF /* These names are deprecated, use C99 names. */ typedef uint8_t u8_t;