3 ==============================================================================
\r
5 This file is part of the async
\r
6 Copyright 2005-10 by Satoshi Fujiwara.
\r
8 async can be redistributed and/or modified under the terms of the
\r
9 GNU General Public License, as published by the Free Software Foundation;
\r
10 either version 2 of the License, or (at your option) any later version.
\r
12 async is distributed in the hope that it will be useful,
\r
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
15 GNU General Public License for more details.
\r
17 You should have received a copy of the GNU General Public License
\r
18 along with async; if not, visit www.gnu.org/licenses or write to the
\r
19 Free Software Foundation, Inc., 59 Temple Place, Suite 330,
\r
20 Boston, MA 02111-1307 USA
\r
22 ==============================================================================
\r
26 #include <boost/lockfree/ringbuffer.hpp>
\r
31 struct buffer_deleter{
\r
32 void operator()(uint8_t *mem)
\r
40 typedef std::unique_ptr<uint8_t,buffer_deleter> memory_block_t;
\r
43 // ストレージからのデータはここに一時的に格納する
\r
44 // この配列値のunique_ptrをget()してリングバッファに渡す
\r
45 typedef boost::array<memory_block_t,16> buffer_t;
\r
47 // リングバッファ マルチスレッド対応
\r
48 typedef boost::lockfree::ringbuffer<uint8_t* ,8> ringbuffer_t;
\r