Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e45e588f authored by Chris Manton's avatar Chris Manton
Browse files

RIP: Removal of more dead timer code

Change-Id: I6e05a1054c4bfd8ccd42cd9df8e3140ce67330c4
parent affd09a3
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -76,13 +76,6 @@

#define EVENT_MASK(evt)       ((UINT16)(0x0001 << (evt)))

/************************************************************************
**  Max Time Queue
**/
#ifndef GKI_MAX_TIMER_QUEUES
#define GKI_MAX_TIMER_QUEUES    3
#endif

/* Timer list entry callback type
*/
typedef void (TIMER_CBACK)(void *p_tle);
@@ -223,7 +216,6 @@ typedef void (SYSTEM_TICK_CBACK)(BOOLEAN);

/* Time queue management for system ticks
*/
GKI_API extern BOOLEAN GKI_timer_queue_empty (void);
GKI_API extern void    GKI_timer_queue_register_callback(SYSTEM_TICK_CBACK *);

/* Disable Interrupts, Enable Interrupts
+0 −2
Original line number Diff line number Diff line
@@ -324,8 +324,6 @@ typedef struct

    BOOLEAN     timer_nesting;                      /* flag to prevent timer interrupt nesting */

    /* Time queue arrays */
    TIMER_LIST_Q *timer_queues[GKI_MAX_TIMER_QUEUES];
    /* System tick callback */
    SYSTEM_TICK_CBACK *p_tick_cb;
    BOOLEAN     system_tick_running;                /* TRUE if system tick is running. Valid only if p_tick_cb is not NULL */
+0 −65
Original line number Diff line number Diff line
@@ -83,11 +83,6 @@ void gki_timers_init(void)
#endif
    }

    for (tt = 0; tt < GKI_MAX_TIMER_QUEUES; tt++)
    {
        gki_cb.com.timer_queues[tt] = NULL;
    }

    gki_cb.com.p_tick_cb = NULL;
    gki_cb.com.system_tick_running = FALSE;

@@ -594,32 +589,6 @@ void GKI_timer_update (INT32 ticks_since_last_update)
    return;
}


/*******************************************************************************
**
** Function         GKI_timer_queue_empty
**
** Description      This function is called by applications to see whether the timer
**                  queue is empty
**
** Parameters
**
** Returns          BOOLEAN
**
*******************************************************************************/
BOOLEAN GKI_timer_queue_empty (void)
{
    UINT8 tt;

    for (tt = 0; tt < GKI_MAX_TIMER_QUEUES; tt++)
    {
        if (gki_cb.com.timer_queues[tt])
            return FALSE;
    }

    return TRUE;
}

/*******************************************************************************
**
** Function         GKI_timer_queue_register_callback
@@ -933,26 +902,7 @@ void GKI_add_to_timer_list (TIMER_LIST_Q *p_timer_listq, TIMER_LIST_ENT *p_tle)
        }

        p_tle->in_use = TRUE;

        /* if we already add this timer queue to the array */
        for (tt = 0; tt < GKI_MAX_TIMER_QUEUES; tt++)
        {
             if (gki_cb.com.timer_queues[tt] == p_timer_listq)
                 return;
        }
        /* add this timer queue to the array */
        for (tt = 0; tt < GKI_MAX_TIMER_QUEUES; tt++)
        {
             if (gki_cb.com.timer_queues[tt] == NULL)
                 break;
    }
        if (tt < GKI_MAX_TIMER_QUEUES)
        {
            gki_cb.com.timer_queues[tt] = p_timer_listq;
        }
    }

    return;
}


@@ -1035,21 +985,6 @@ void GKI_remove_from_timer_list (TIMER_LIST_Q *p_timer_listq, TIMER_LIST_ENT *p
    p_tle->p_next = p_tle->p_prev = NULL;
    p_tle->ticks = GKI_UNUSED_LIST_ENTRY;
    p_tle->in_use = FALSE;

    /* if timer queue is empty */
    if (p_timer_listq->p_first == NULL && p_timer_listq->p_last == NULL)
    {
        for (tt = 0; tt < GKI_MAX_TIMER_QUEUES; tt++)
        {
            if (gki_cb.com.timer_queues[tt] == p_timer_listq)
            {
                gki_cb.com.timer_queues[tt] = NULL;
                break;
            }
        }
    }

    return;
}