Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Jean-Luc Brouillet | 4a73004 | 2015-04-02 16:15:25 -0700 | [diff] [blame^] | 17 | // Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame] | 18 | |
| 19 | /* |
| 20 | * rs_io.rsh: Input/output functions |
| 21 | * |
| 22 | * TODO Add documentation |
| 23 | */ |
Jean-Luc Brouillet | 4a73004 | 2015-04-02 16:15:25 -0700 | [diff] [blame^] | 24 | |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame] | 25 | #ifndef RENDERSCRIPT_RS_IO_RSH |
| 26 | #define RENDERSCRIPT_RS_IO_RSH |
| 27 | |
| 28 | /* |
| 29 | * rsAllocationIoReceive: Receive new content from the queue |
| 30 | * |
| 31 | * Receive a new set of contents from the queue. |
| 32 | * |
| 33 | * Parameters: |
Jean-Luc Brouillet | 4a73004 | 2015-04-02 16:15:25 -0700 | [diff] [blame^] | 34 | * a: allocation to work on |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame] | 35 | */ |
| 36 | #if (defined(RS_VERSION) && (RS_VERSION >= 16)) |
| 37 | extern void __attribute__((overloadable)) |
| 38 | rsAllocationIoReceive(rs_allocation a); |
| 39 | #endif |
| 40 | |
| 41 | /* |
| 42 | * rsAllocationIoSend: Send new content to the queue |
| 43 | * |
| 44 | * Send the contents of the Allocation to the queue. |
| 45 | * |
| 46 | * Parameters: |
Jean-Luc Brouillet | 4a73004 | 2015-04-02 16:15:25 -0700 | [diff] [blame^] | 47 | * a: allocation to work on |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame] | 48 | */ |
| 49 | #if (defined(RS_VERSION) && (RS_VERSION >= 16)) |
| 50 | extern void __attribute__((overloadable)) |
| 51 | rsAllocationIoSend(rs_allocation a); |
| 52 | #endif |
| 53 | |
| 54 | /* |
| 55 | * Send a message back to the client. Will not block and returns true |
| 56 | * if the message was sendable and false if the fifo was full. |
| 57 | * A message ID is required. Data payload is optional. |
| 58 | */ |
| 59 | extern bool __attribute__((overloadable)) |
| 60 | rsSendToClient(int cmdID); |
| 61 | |
| 62 | extern bool __attribute__((overloadable)) |
| 63 | rsSendToClient(int cmdID, const void* data, uint len); |
| 64 | |
| 65 | /* |
| 66 | * Send a message back to the client, blocking until the message is queued. |
| 67 | * A message ID is required. Data payload is optional. |
| 68 | */ |
| 69 | extern void __attribute__((overloadable)) |
| 70 | rsSendToClientBlocking(int cmdID); |
| 71 | |
| 72 | extern void __attribute__((overloadable)) |
| 73 | rsSendToClientBlocking(int cmdID, const void* data, uint len); |
| 74 | |
| 75 | #endif // RENDERSCRIPT_RS_IO_RSH |