VoLTHA | 753536e | 2017-11-02 20:15:09 +0530 | [diff] [blame] | 1 | /* |
| 2 | ** Copyright 2017-present Open Networking Foundation |
| 3 | ** |
| 4 | ** Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | ** you may not use this file except in compliance with the License. |
| 6 | ** You may obtain a copy of the License at |
| 7 | ** |
| 8 | ** http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | ** |
| 10 | ** Unless required by applicable law or agreed to in writing, software |
| 11 | ** distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | ** See the License for the specific language governing permissions and |
| 14 | ** limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef __BAL_INDICATIONS_QUEUE_H__ |
| 18 | #define __BAL_INDICATIONS_QUEUE_H__ |
| 19 | |
| 20 | #include "bal_indications.grpc-c.h" |
| 21 | |
root | 2ca2cc0 | 2017-11-03 19:51:57 +0530 | [diff] [blame] | 22 | #define MAX_QUEUE_SIZE 1000 |
VoLTHA | 753536e | 2017-11-02 20:15:09 +0530 | [diff] [blame] | 23 | |
| 24 | typedef struct node { |
| 25 | struct node *next; |
| 26 | BalIndications *bal_indication; |
| 27 | }list_node; |
| 28 | |
| 29 | |
| 30 | extern pthread_mutex_t bal_ind_queue_lock; |
| 31 | extern list_node *bal_ind_queue_head; |
| 32 | extern list_node *bal_ind_queue_tail; |
| 33 | extern unsigned int num_of_nodes; |
| 34 | |
| 35 | extern void bal_get_ind__free_mem(BalIndications *balIndCfg); |
| 36 | extern list_node* get_bal_indication_node(void); |
| 37 | extern void add_bal_indication_node(list_node *node); |
| 38 | |
| 39 | |
| 40 | |
root | 2ca2cc0 | 2017-11-03 19:51:57 +0530 | [diff] [blame] | 41 | #endif /*__BAL_INDICATIONS_QUEUE_H__*/ |