OLD | NEW |
1 // Copyright 2017 The Chromium OS Authors. All rights reserved. | 1 // Copyright 2017 The Chromium OS 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 "compressor_io_javascript_stream.h" | 5 #include "compressor_io_javascript_stream.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <thread> | 8 #include <thread> |
9 | 9 |
10 #include "archive.h" | 10 #include "archive.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 char* array_buffer_data = static_cast<char*>(array_buffer->Map()); | 75 char* array_buffer_data = static_cast<char*>(array_buffer->Map()); |
76 memcpy(destination_buffer_, array_buffer_data, read_bytes); | 76 memcpy(destination_buffer_, array_buffer_data, read_bytes); |
77 array_buffer->Unmap(); | 77 array_buffer->Unmap(); |
78 } | 78 } |
79 | 79 |
80 read_bytes_ = read_bytes; | 80 read_bytes_ = read_bytes; |
81 available_data_ = true; | 81 available_data_ = true; |
82 pthread_cond_signal(&available_data_cond_); | 82 pthread_cond_signal(&available_data_cond_); |
83 pthread_mutex_unlock(&shared_state_lock_); | 83 pthread_mutex_unlock(&shared_state_lock_); |
84 } | 84 } |
OLD | NEW |