/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2016-2019 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
f = fsh->free_fifos[freelist_index];
if (PREDICT_FALSE (!f))
{
- /* Preallocated and no fifo left. Don't even try */
- if (fsh->flags & FIFO_SEGMENT_F_IS_PREALLOCATED)
- goto done;
-
oldheap = ssvm_push_heap (sh);
allocate_new_fifo_chunk (fsh, data_size_in_bytes,
FIFO_SEGMENT_ALLOC_CHUNK_SIZE);
{
ssvm_shared_header_t *sh;
svm_fifo_segment_header_t *fsh;
- void *oldheap;
int freelist_index;
ASSERT (f->refcnt > 0);
ASSERT (freelist_index < vec_len (fsh->free_fifos));
ssvm_lock_non_recursive (sh, 2);
- oldheap = ssvm_push_heap (sh);
switch (list_index)
{
}
fsh->n_active_fifos--;
- ssvm_pop_heap (oldheap);
ssvm_unlock_non_recursive (sh);
}