2 * Copyright (C) ARM Limited 2013. All rights reserved.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
14 #include <semaphore.h>
20 static const size_t MAXSIZE_PACK32 = 5;
21 static const size_t MAXSIZE_PACK64 = 10;
23 Buffer (int32_t core, int32_t buftype, const int size, sem_t *const readerSem);
26 void write (Sender * sender);
28 int bytesAvailable () const;
29 void commit (const uint64_t time);
30 void check (const uint64_t time);
34 bool eventHeader (uint64_t curr_time);
35 bool eventTid (int tid);
36 void event (int32_t key, int32_t value);
37 void event64 (int64_t key, int64_t value);
43 bool commitReady () const;
44 bool checkSpace (int bytes);
46 void packInt (int32_t x);
47 void packInt64 (int64_t x);
50 const int32_t buftype;
59 sem_t *const readerSem;
61 // Intentionally unimplemented
62 Buffer(const Buffer &);
63 Buffer &operator=(const Buffer &);