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

soc_log_buf.h (1478B)


      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  * File: soc_log_buf.h
      7  * Purpose: Thread safe circular buffer for logs
      8  */
      9 
     10 #ifndef _SOC_LOG_BUF_H_
     11 #define _SOC_LOG_BUF_H_
     12 
     13 #include <sal/core/sync.h>
     14 
     15 extern int soc_log_buf_init(void *location, int size, sal_mutex_t mutex);
     16 extern int soc_log_buf_inc_boot_count(void *location);
     17 extern int soc_log_buf_validate(void *location, int size);
     18 extern int soc_log_buf_add(void *location, int size);
     19 extern int soc_log_buf_entry_get_size(void *location, int id, int *size);
     20 extern int soc_log_buf_entry_read(void *location, int id, int offset, 
     21     int size, void *data);
     22 extern int soc_log_buf_entry_write(void *location, int id, int offset,
     23     int size, void *data);
     24 extern int soc_log_buf_entry_valid(void *location, int id);
     25 extern int soc_log_buf_get_boot_count(void *location);
     26 extern int soc_log_buf_print(void *location);
     27 extern int soc_log_buf_set_mutex(void *location, sal_mutex_t mutex);
     28 extern int soc_log_buf_get_next_id(void *location, int id);
     29 extern sal_mutex_t soc_log_buf_get_mutex(void *location);
     30 extern int soc_log_buf_search(void *location,
     31                               void *buffer,
     32                               int buf_size,
     33                               void *criteria, 
     34                               int (*match)(void * crit, void * entry));
     35 #endif