| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 if (message->handles) delete [] message->handles; | 134 if (message->handles) delete [] message->handles; |
| 135 } | 135 } |
| 136 | 136 |
| 137 // Processes one message, getting one from the incoming queue (blocking), | 137 // Processes one message, getting one from the incoming queue (blocking), |
| 138 // dispatching it to the implementation (if not the "poisoned" message), and | 138 // dispatching it to the implementation (if not the "poisoned" message), and |
| 139 // adding the return value to the outgoing queue. | 139 // adding the return value to the outgoing queue. |
| 140 bool RPCServer::Processor::ProcessMessage() { | 140 bool RPCServer::Processor::ProcessMessage() { |
| 141 RPCMessage input; | 141 RPCMessage input; |
| 142 in_queue_->GetMessage(&input); | 142 in_queue_->GetMessage(&input); |
| 143 RPCImplInterface::ReturnValue result = 0; | 143 RPCImplInterface::ReturnValue result = 0; |
| 144 int continue_processing = true; | 144 bool continue_processing = true; |
| 145 if (input.message_id == POISONED_MESSAGE_ID) { | 145 if (input.message_id == POISONED_MESSAGE_ID) { |
| 146 continue_processing = false; | 146 continue_processing = false; |
| 147 } else { | 147 } else { |
| 148 result = impl_->DoCall(input.message_id, input.data, input.size, | 148 result = impl_->DoCall(input.message_id, input.data, input.size, |
| 149 input.handles, input.handle_count); | 149 input.handles, input.handle_count); |
| 150 } | 150 } |
| 151 DestroyMessage(&input); | 151 DestroyMessage(&input); |
| 152 | 152 |
| 153 RPCMessage output; | 153 RPCMessage output; |
| 154 AllocMessage(RESPONSE_ID, &result, sizeof(result), NULL, 0, &output); | 154 AllocMessage(RESPONSE_ID, &result, sizeof(result), NULL, 0, &output); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 | 217 |
| 218 void *MapShm(RPCShmHandle handle, size_t size) { | 218 void *MapShm(RPCShmHandle handle, size_t size) { |
| 219 return (size <= handle->size) ? return handle->address : NULL; | 219 return (size <= handle->size) ? return handle->address : NULL; |
| 220 } | 220 } |
| 221 | 221 |
| 222 void UnmapShm(void * address, size_t size) { | 222 void UnmapShm(void * address, size_t size) { |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace command_buffer | 225 } // namespace command_buffer |
| 226 } // namespace o3d | 226 } // namespace o3d |
| OLD | NEW |