Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Unified Diff: platforms/stm/disco_dartino/src/circular_buffer.cc

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: platforms/stm/disco_dartino/src/circular_buffer.cc
diff --git a/platforms/stm/disco_fletch/src/circular_buffer.cc b/platforms/stm/disco_dartino/src/circular_buffer.cc
similarity index 87%
rename from platforms/stm/disco_fletch/src/circular_buffer.cc
rename to platforms/stm/disco_dartino/src/circular_buffer.cc
index d0ba1efdc22397ccab930fe55d1e68317a78008d..975e2b1c0177f5b469eeb14c61338f86d44c1e03 100755
--- a/platforms/stm/disco_fletch/src/circular_buffer.cc
+++ b/platforms/stm/disco_dartino/src/circular_buffer.cc
@@ -2,13 +2,13 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE.md file.
-#include "platforms/stm/disco_fletch/src/circular_buffer.h"
+#include "platforms/stm/disco_dartino/src/circular_buffer.h"
#include <stdlib.h>
#include <string.h>
CircularBuffer::CircularBuffer(size_t capacity) {
- monitor_ = fletch::Platform::CreateMonitor();
+ monitor_ = dartino::Platform::CreateMonitor();
// One additional byte needed to distinguish between empty and full.
capacity_ = capacity + 1;
buffer_ = new uint8_t[capacity_];
@@ -20,17 +20,17 @@ CircularBuffer::~CircularBuffer() {
}
bool CircularBuffer::IsEmpty() {
- fletch::ScopedMonitorLock locker(monitor_);
+ dartino::ScopedMonitorLock locker(monitor_);
return head_ == tail_;
}
bool CircularBuffer::IsFull() {
- fletch::ScopedMonitorLock locker(monitor_);
+ dartino::ScopedMonitorLock locker(monitor_);
return ((head_ + 1) % capacity_) == tail_;
}
size_t CircularBuffer::Read(uint8_t* data, size_t count, Blocking block) {
- fletch::ScopedMonitorLock locker(monitor_);
+ dartino::ScopedMonitorLock locker(monitor_);
// If buffer is empty wait for data.
if (block == kBlock) {
@@ -63,7 +63,7 @@ size_t CircularBuffer::Read(uint8_t* data, size_t count, Blocking block) {
size_t CircularBuffer::Write(
const uint8_t* data, size_t count, Blocking block) {
- fletch::ScopedMonitorLock locker(monitor_);
+ dartino::ScopedMonitorLock locker(monitor_);
// If buffer is full wait for room.
if (block == kBlock) {
« no previous file with comments | « platforms/stm/disco_dartino/src/circular_buffer.h ('k') | platforms/stm/disco_dartino/src/circular_buffer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698