| 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 #include "queue.h" | 5 #include "queue.h" |
| 6 | 6 |
| 7 #include <pthread.h> | 7 #include <pthread.h> |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 | 9 |
| 10 #include "ppapi/c/pp_var.h" | 10 #include "ppapi/c/pp_var.h" |
| 11 | 11 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 } | 102 } |
| 103 | 103 |
| 104 message = g_queue[g_queue_start]; | 104 message = g_queue[g_queue_start]; |
| 105 g_queue_start = (g_queue_start + 1) % MAX_QUEUE_SIZE; | 105 g_queue_start = (g_queue_start + 1) % MAX_QUEUE_SIZE; |
| 106 g_queue_size--; | 106 g_queue_size--; |
| 107 | 107 |
| 108 pthread_mutex_unlock(&g_queue_mutex); | 108 pthread_mutex_unlock(&g_queue_mutex); |
| 109 | 109 |
| 110 return message; | 110 return message; |
| 111 } | 111 } |
| OLD | NEW |