1/* 2 * Copyright (c) 2004-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 92 unchanged lines hidden (view full) --- 101 unsigned reserved() const { return _reserved; } 102 unsigned avail() const { return _maxsize - _size - _reserved; } 103 bool empty() const { return size() <= 0; } 104 bool full() const { return avail() <= 0; } 105 106 unsigned 107 reserve(unsigned len = 0) 108 { |
109 assert(avail() >= len); |
110 _reserved += len; |
111 return _reserved; 112 } 113 114 iterator begin() { return fifo.begin(); } 115 iterator end() { return fifo.end(); } 116 117 const_iterator begin() const { return fifo.begin(); } 118 const_iterator end() const { return fifo.end(); } --- 94 unchanged lines hidden --- |