openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

latency_monitor.c (2203B)


      1 /****************************************************************************
      2  *
      3  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      4  *
      5  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      6  *
      7  */
      8 
      9 /*
     10  * File:    latency_monitor.c
     11  * Purpose: Common latency_monitor APIs
     12  */
     13 
     14 #include <soc/defs.h>
     15 
     16 #include <sal/core/libc.h>
     17 
     18 #include <soc/drv.h>
     19 #include <soc/mem.h>
     20 #include <soc/util.h>
     21 
     22 #include <bcm/latency_monitor.h>
     23 
     24 /*
     25  * Function:
     26  *      bcm_latency_monitor_config_t_init
     27  * Purpose:
     28  *      Initialize a bcm_latency_monitor_config_t structure
     29  * Parameters:
     30  *      config - pointer to bcm_latency_monitor_config_t
     31  * Returns:
     32  *      NONE
     33  */
     34 
     35 void
     36 bcm_latency_monitor_config_t_init(bcm_latency_monitor_config_t *config)
     37 {
     38     if (NULL != config) {
     39         sal_memset(config, 0, sizeof (*config));
     40     }
     41     return;
     42 }
     43 
     44 /*
     45  * Function:
     46  *      bcm_latency_monitor_cosq_info_t_init
     47  * Purpose:
     48  *      Initialize a bcm_latency_monitor_cosq_info_t structure
     49  * Parameters:
     50  *      config - pointer to bcm_latency_monitor_cosq_info_t
     51  * Returns:
     52  *      NONE
     53  */
     54 
     55 void
     56 bcm_latency_monitor_cosq_info_t_init(bcm_latency_monitor_cosq_info_t *config)
     57 {
     58     if (NULL != config) {
     59         sal_memset(config, 0, sizeof (*config));
     60     }
     61     return;
     62 }
     63 
     64 /*
     65  * Function:
     66  *      bcm_latency_monitor_histogram_t_init
     67  * Purpose:
     68  *      Initialize a bcm_latency_monitor_histogram_t structure
     69  * Parameters:
     70  *      config - pointer to bcm_latency_monitor_histogram_t
     71  * Returns:
     72  *      NONE
     73  */
     74 
     75 void
     76 bcm_latency_monitor_histogram_t_init(bcm_latency_monitor_histogram_t *histogram)
     77 {
     78     if (NULL != histogram) {
     79         sal_memset(histogram, 0, sizeof (*histogram));
     80     }
     81     return;
     82 }
     83 
     84 
     85 /*
     86  * Function:
     87  *      bcm_latency_monitor_info_t_init
     88  * Purpose:
     89  *      Initialize a bcm_latency_monitor_info_t_init structure
     90  * Parameters:
     91  *      config - pointer to bcm_latency_monitor_info_t
     92  * Returns:
     93  *      NONE
     94  */
     95 
     96 void
     97 bcm_latency_monitor_info_t_init(bcm_latency_monitor_info_t *monitor_info)
     98 {
     99     if (NULL != monitor_info) {
    100         sal_memset(monitor_info, 0, sizeof (*monitor_info));
    101     }
    102     return;
    103 }
    104