Elimate use of the non-standard type systime_t and replace it the equivalent, standard type clock_t

Squashed commit of the following:

    sched:  Rename all use of system_t to clock_t.
    syscall:  Rename all use of system_t to clock_t.
    net:  Rename all use of system_t to clock_t.
    libs:  Rename all use of system_t to clock_t.
    fs:  Rename all use of system_t to clock_t.
    drivers:  Rename all use of system_t to clock_t.
    arch:  Rename all use of system_t to clock_t.
    include:  Remove definition of systime_t; rename all use of system_t to clock_t.
This commit is contained in:
Gregory Nutt
2018-06-16 12:16:13 -06:00
parent 450e0809de
commit 8fdbb1e0a4
85 changed files with 274 additions and 271 deletions
+1 -1
View File
@@ -297,7 +297,7 @@ EXTERN uint8_t g_reassembly_timer;
/* Time of last poll */
EXTERN systime_t g_polltime;
EXTERN clock_t g_polltime;
/****************************************************************************
* Public Function Prototypes
+4 -4
View File
@@ -82,7 +82,7 @@ enum devif_packet_type
/* Time of last poll */
systime_t g_polltime;
clock_t g_polltime;
/****************************************************************************
* Private Functions
@@ -708,8 +708,8 @@ int devif_poll(FAR struct net_driver_s *dev, devif_poll_callback_t callback)
int devif_timer(FAR struct net_driver_s *dev, devif_poll_callback_t callback)
{
systime_t now;
systime_t elapsed;
clock_t now;
clock_t elapsed;
int bstop = false;
/* Get the elapsed time since the last poll in units of half seconds
@@ -733,7 +733,7 @@ int devif_timer(FAR struct net_driver_s *dev, devif_poll_callback_t callback)
* boundary to avoid error build-up).
*/
g_polltime += (TICK_PER_HSEC * (systime_t)hsec);
g_polltime += (TICK_PER_HSEC * (clock_t)hsec);
/* Perform periodic activitives that depend on hsec > 0 */
+1 -1
View File
@@ -71,7 +71,7 @@ struct icmp_recvfrom_s
FAR struct devif_callback_s *recv_cb; /* Reference to callback instance */
FAR struct socket *recv_sock; /* IPPROTO_ICMP socket structure */
sem_t recv_sem; /* Use to manage the wait for the response */
systime_t recv_time; /* Start time for determining timeouts */
clock_t recv_time; /* Start time for determining timeouts */
in_addr_t recv_from; /* The peer we received the request from */
FAR uint8_t *recv_buf; /* Location to return the response */
uint16_t recv_buflen; /* Size of the response */
+1 -1
View File
@@ -89,7 +89,7 @@ struct icmp_sendto_s
FAR struct devif_callback_s *snd_cb; /* Reference to callback instance */
FAR struct socket *snd_sock; /* IPPROTO_ICMP socket structure */
sem_t snd_sem; /* Use to manage the wait for send complete */
systime_t snd_time; /* Start time for determining timeouts */
clock_t snd_time; /* Start time for determining timeouts */
in_addr_t snd_toaddr; /* The peer to send the request to */
FAR const uint8_t *snd_buf; /* ICMP header + data payload */
uint16_t snd_buflen; /* Size of the ICMP header + data payload */
+1 -1
View File
@@ -74,7 +74,7 @@ struct icmpv6_recvfrom_s
FAR struct devif_callback_s *recv_cb; /* Reference to callback instance */
FAR struct socket *recv_sock; /* IPPROTO_ICMP6 socket structure */
sem_t recv_sem; /* Use to manage the wait for the response */
systime_t recv_time; /* Start time for determining timeouts */
clock_t recv_time; /* Start time for determining timeouts */
struct in6_addr recv_from; /* The peer we received the request from */
FAR uint8_t *recv_buf; /* Location to return the response */
uint16_t recv_buflen; /* Size of the response */
+1 -1
View File
@@ -89,7 +89,7 @@ struct icmpv6_sendto_s
FAR struct devif_callback_s *snd_cb; /* Reference to callback instance */
FAR struct socket *snd_sock; /* IPPROTO_ICMP6 socket structure */
sem_t snd_sem; /* Use to manage the wait for send complete */
systime_t snd_time; /* Start time for determining timeouts */
clock_t snd_time; /* Start time for determining timeouts */
struct in6_addr snd_toaddr; /* The peer to send the request to */
FAR const uint8_t *snd_buf; /* ICMPv6 header + data payload */
uint16_t snd_buflen; /* Size of the ICMPv6 header + data payload */
+1 -1
View File
@@ -82,7 +82,7 @@ struct tcp_close_s
FAR struct socket *cl_psock; /* Reference to the TCP socket */
sem_t cl_sem; /* Signals disconnect completion */
int cl_result; /* The result of the close */
systime_t cl_start; /* Time close started (in ticks) */
clock_t cl_start; /* Time close started (in ticks) */
#endif
};
#endif
+1 -1
View File
@@ -93,7 +93,7 @@ struct inet_recvfrom_s
{
FAR struct socket *ir_sock; /* The parent socket structure */
#ifdef CONFIG_NET_SOCKOPTS
systime_t ir_starttime; /* rcv start time for determining timeout */
clock_t ir_starttime; /* rcv start time for determining timeout */
#endif
FAR struct devif_callback_s *ir_cb; /* Reference to callback instance */
sem_t ir_sem; /* Semaphore signals recv completion */
+1 -1
View File
@@ -136,7 +136,7 @@ static void sixlowpan_reass_expire(void)
{
FAR struct sixlowpan_reassbuf_s *reass;
FAR struct sixlowpan_reassbuf_s *next;
systime_t elapsed;
clock_t elapsed;
/* If reassembly timed out, cancel it */
+3 -3
View File
@@ -82,7 +82,7 @@ struct sixlowpan_send_s
sem_t s_waitsem; /* Supports waiting for driver events */
int s_result; /* The result of the transfer */
uint16_t s_timeout; /* Send timeout in deciseconds */
systime_t s_time; /* Last send time for determining timeout */
clock_t s_time; /* Last send time for determining timeout */
FAR const struct ipv6_hdr_s *s_ipv6hdr; /* IPv6 header, followed by UDP or ICMP header. */
FAR const struct netdev_varaddr_s *s_destmac; /* Destination MAC address */
FAR const void *s_buf; /* Data to send */
@@ -120,8 +120,8 @@ static inline bool send_timeout(FAR struct sixlowpan_send_s *sinfo)
{
/* Check if the configured timeout has elapsed */
systime_t timeo_ticks = DSEC2TICK(sinfo->s_timeout);
systime_t elapsed = clock_systimer() - sinfo->s_time;
clock_t timeo_ticks = DSEC2TICK(sinfo->s_timeout);
clock_t elapsed = clock_systimer() - sinfo->s_time;
if (elapsed >= timeo_ticks)
{
+3 -3
View File
@@ -95,7 +95,7 @@ struct sixlowpan_send_s
sem_t s_waitsem; /* Supports waiting for driver events */
int s_result; /* The result of the transfer */
uint16_t s_timeout; /* Send timeout in deciseconds */
systime_t s_time; /* Last send time for determining timeout */
clock_t s_time; /* Last send time for determining timeout */
FAR const struct netdev_varaddr_s *s_destmac; /* Destination MAC address */
FAR const uint8_t *s_buf; /* Data to send */
size_t s_buflen; /* Length of data in buf */
@@ -307,8 +307,8 @@ static inline bool send_timeout(FAR struct sixlowpan_send_s *sinfo)
{
/* Check if the configured timeout has elapsed */
systime_t timeo_ticks = DSEC2TICK(sinfo->s_timeout);
systime_t elapsed = clock_systimer() - sinfo->s_time;
clock_t timeo_ticks = DSEC2TICK(sinfo->s_timeout);
clock_t elapsed = clock_systimer() - sinfo->s_time;
if (elapsed >= timeo_ticks)
{
+3 -3
View File
@@ -69,10 +69,10 @@
*
****************************************************************************/
int net_timeo(systime_t start_time, socktimeo_t timeo)
int net_timeo(clock_t start_time, socktimeo_t timeo)
{
systime_t timeo_ticks = DSEC2TICK(timeo);
systime_t elapsed = clock_systimer() - start_time;
clock_t timeo_ticks = DSEC2TICK(timeo);
clock_t elapsed = clock_systimer() - start_time;
if (elapsed >= timeo_ticks)
{
+1 -1
View File
@@ -253,7 +253,7 @@ FAR const struct sock_intf_s *
****************************************************************************/
#ifdef CONFIG_NET_SOCKOPTS
int net_timeo(systime_t start_time, socktimeo_t timeo);
int net_timeo(clock_t start_time, socktimeo_t timeo);
#endif
/****************************************************************************
+1 -1
View File
@@ -205,7 +205,7 @@ struct tcp_conn_s
* system clock tick.
*/
systime_t keeptime; /* Last time that the TCP socket was known to be
clock_t keeptime; /* Last time that the TCP socket was known to be
* alive (ACK or data received) OR time that the
* last probe was sent. */
uint16_t keepidle; /* Elapsed idle time before first probe sent (dsec) */
+1 -1
View File
@@ -107,7 +107,7 @@ struct send_s
uint32_t snd_isn; /* Initial sequence number */
uint32_t snd_acked; /* The number of bytes acked */
#ifdef CONFIG_NET_SOCKOPTS
systime_t snd_time; /* Last send time for determining timeout */
clock_t snd_time; /* Last send time for determining timeout */
#endif
#if defined(CONFIG_NET_TCP_SPLIT)
bool snd_odd; /* True: Odd packet in pair transaction */
+1 -1
View File
@@ -106,7 +106,7 @@ struct sendfile_s
uint32_t snd_isn; /* Initial sequence number */
uint32_t snd_acked; /* The number of bytes acked */
#ifdef CONFIG_NET_SOCKOPTS
systime_t snd_time; /* Last send time for determining timeout */
clock_t snd_time; /* Last send time for determining timeout */
#endif
};
+1 -1
View File
@@ -148,7 +148,7 @@ struct udp_wrbuffer_s
sq_entry_t wb_node; /* Supports a singly linked list */
struct sockaddr_storage wb_dest; /* Destination address */
#ifdef CONFIG_NET_SOCKOPTS
systime_t wb_start; /* Start time for timeout calculation */
clock_t wb_start; /* Start time for timeout calculation */
#endif
struct iob_s *wb_iob; /* Head of the I/O buffer chain */
};
+1 -1
View File
@@ -81,7 +81,7 @@ struct sendto_s
FAR struct socket *st_sock; /* Points to the parent socket structure */
#endif
#ifdef CONFIG_NET_SOCKOPTS
systime_t st_time; /* Last send time for determining timeout */
clock_t st_time; /* Last send time for determining timeout */
#endif
FAR struct devif_callback_s *st_cb; /* Reference to callback instance */
sem_t st_sem; /* Semaphore signals sendto completion */