OLD | NEW |
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2016 The Chromium Authors. All rights reserved. |
2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. */ | 3 * found in the LICENSE file. */ |
4 | 4 |
5 #ifndef QUEUE_H_ | 5 #ifndef QUEUE_H_ |
6 #define QUEUE_H_ | 6 #define QUEUE_H_ |
7 | 7 |
8 #include "ppapi/c/pp_var.h" | 8 #include "ppapi/c/pp_var.h" |
9 | 9 |
10 /* This file implements a single-producer/single-consumer queue, using a mutex | 10 /* This file implements a single-producer/single-consumer queue, using a mutex |
11 * and a condition variable. | 11 * and a condition variable. |
(...skipping 10 matching lines...) Expand all Loading... |
22 * DequeueMessage will block until a message is available using a condition | 22 * DequeueMessage will block until a message is available using a condition |
23 * variable. Again, this may not be as fast as spin-waiting, but will consume | 23 * variable. Again, this may not be as fast as spin-waiting, but will consume |
24 * much less CPU (and battery), which is important to consider for ChromeOS | 24 * much less CPU (and battery), which is important to consider for ChromeOS |
25 * devices. */ | 25 * devices. */ |
26 | 26 |
27 void InitializeMessageQueue(); | 27 void InitializeMessageQueue(); |
28 int EnqueueMessage(struct PP_Var message); | 28 int EnqueueMessage(struct PP_Var message); |
29 struct PP_Var DequeueMessage(); | 29 struct PP_Var DequeueMessage(); |
30 | 30 |
31 #endif /* QUEUE_H_ */ | 31 #endif /* QUEUE_H_ */ |
OLD | NEW |