| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 The Native Client Authors. All rights reserved. | 2 * Copyright 2010 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can | 3 * Use of this source code is governed by a BSD-style license that can |
| 4 * be found in the LICENSE file. | 4 * be found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #include <stdarg.h> | 7 #include <stdarg.h> |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 #include <string.h> | 10 #include <string.h> |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 96 |
| 97 private: | 97 private: |
| 98 uint8_t *ctx_; | 98 uint8_t *ctx_; |
| 99 uint32_t id_; | 99 uint32_t id_; |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 IThread* IThread::Create(uint32_t id, struct NaClAppThread *) { | 102 IThread* IThread::Create(uint32_t id, struct NaClAppThread *) { |
| 103 return new ThreadMock(id); | 103 return new ThreadMock(id); |
| 104 } | 104 } |
| 105 | 105 |
| 106 void IThread::SuspendAll(uint32_t) { |
| 107 } |
| 108 |
| 109 void IThread::ResumeAll(uint32_t) { |
| 110 } |
| 111 |
| 106 | 112 |
| 107 bool port::IPlatform::GetMemory(uint64_t addr, uint32_t len, void *dst) { | 113 bool port::IPlatform::GetMemory(uint64_t addr, uint32_t len, void *dst) { |
| 108 intptr_t iptr = static_cast<intptr_t>(addr); | 114 intptr_t iptr = static_cast<intptr_t>(addr); |
| 109 void *src = reinterpret_cast<void*>(iptr); | 115 void *src = reinterpret_cast<void*>(iptr); |
| 110 memcpy(dst, src, len); | 116 memcpy(dst, src, len); |
| 111 return true; | 117 return true; |
| 112 } | 118 } |
| 113 | 119 |
| 114 bool port::IPlatform::SetMemory(uint64_t addr, uint32_t len, void *src) { | 120 bool port::IPlatform::SetMemory(uint64_t addr, uint32_t len, void *src) { |
| 115 intptr_t iptr = static_cast<intptr_t>(addr); | 121 intptr_t iptr = static_cast<intptr_t>(addr); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 142 printf("Testing Host.\n"); | 148 printf("Testing Host.\n"); |
| 143 errs += TestHost(); | 149 errs += TestHost(); |
| 144 | 150 |
| 145 printf("Testing Target.\n"); | 151 printf("Testing Target.\n"); |
| 146 errs += TestTarget(); | 152 errs += TestTarget(); |
| 147 | 153 |
| 148 if (errs) printf("FAILED with %d errors.\n", errs); | 154 if (errs) printf("FAILED with %d errors.\n", errs); |
| 149 return errs; | 155 return errs; |
| 150 } | 156 } |
| 151 | 157 |
| OLD | NEW |