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

Unified Diff: native_client_sdk/src/examples/demo/nacl_io/queue.h

Issue 306973002: [NaCl SDK] rename nacl_io demo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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: native_client_sdk/src/examples/demo/nacl_io/queue.h
diff --git a/native_client_sdk/src/examples/demo/nacl_io/queue.h b/native_client_sdk/src/examples/demo/nacl_io/queue.h
deleted file mode 100644
index 69226be6ac7c7d65d323e70ca26671fac0cac042..0000000000000000000000000000000000000000
--- a/native_client_sdk/src/examples/demo/nacl_io/queue.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef QUEUE_H_
-#define QUEUE_H_
-
-#include "ppapi/c/pp_var.h"
-
-/* This file implements a single-producer/single-consumer queue, using a mutex
- * and a condition variable.
- *
- * There are techniques to implement a queue like this without using memory
- * barriers or locks on x86, but ARM's memory system is different from x86, so
- * we cannot make the same assumptions about visibility order of writes. Using a
- * mutex is slower, but also simpler.
- *
- * We make the assumption that messages are only enqueued on the main thread
- * and consumed on the worker thread. Because we don't want to block the main
- * thread, EnqueueMessage will return zero if the message could not be enqueued.
- *
- * DequeueMessage will block until a message is available using a condition
- * variable. Again, this may not be as fast as spin-waiting, but will consume
- * much less CPU (and battery), which is important to consider for ChromeOS
- * devices. */
-
-void InitializeMessageQueue();
-int EnqueueMessage(struct PP_Var message);
-struct PP_Var DequeueMessage();
-
-#endif /* QUEUE_H_ */
« no previous file with comments | « native_client_sdk/src/examples/demo/nacl_io/nacl_io_demo.c ('k') | native_client_sdk/src/examples/demo/nacl_io/queue.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698