1*344a7f5eSAndroid Build Coastguard Worker/* 2*344a7f5eSAndroid Build Coastguard Worker * Copyright (C) 2016 The Android Open Source Project 3*344a7f5eSAndroid Build Coastguard Worker * 4*344a7f5eSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License"); 5*344a7f5eSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 6*344a7f5eSAndroid Build Coastguard Worker * You may obtain a copy of the License at 7*344a7f5eSAndroid Build Coastguard Worker * 8*344a7f5eSAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 9*344a7f5eSAndroid Build Coastguard Worker * 10*344a7f5eSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 11*344a7f5eSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 12*344a7f5eSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*344a7f5eSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 14*344a7f5eSAndroid Build Coastguard Worker * limitations under the License. 15*344a7f5eSAndroid Build Coastguard Worker */ 16*344a7f5eSAndroid Build Coastguard Worker 17*344a7f5eSAndroid Build Coastguard Worker// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. 18*344a7f5eSAndroid Build Coastguard Worker 19*344a7f5eSAndroid Build Coastguard Worker/* 20*344a7f5eSAndroid Build Coastguard Worker * rs_io.rsh: Input/Output Functions 21*344a7f5eSAndroid Build Coastguard Worker * 22*344a7f5eSAndroid Build Coastguard Worker * These functions are used to: 23*344a7f5eSAndroid Build Coastguard Worker * - Send information to the Java client, and 24*344a7f5eSAndroid Build Coastguard Worker * - Send the processed allocation or receive the next allocation to process. 25*344a7f5eSAndroid Build Coastguard Worker */ 26*344a7f5eSAndroid Build Coastguard Worker 27*344a7f5eSAndroid Build Coastguard Worker#ifndef RENDERSCRIPT_RS_IO_RSH 28*344a7f5eSAndroid Build Coastguard Worker#define RENDERSCRIPT_RS_IO_RSH 29*344a7f5eSAndroid Build Coastguard Worker 30*344a7f5eSAndroid Build Coastguard Worker/* 31*344a7f5eSAndroid Build Coastguard Worker * rsAllocationIoReceive: Receive new content from the queue 32*344a7f5eSAndroid Build Coastguard Worker * 33*344a7f5eSAndroid Build Coastguard Worker * Receive a new set of contents from the queue. 34*344a7f5eSAndroid Build Coastguard Worker * 35*344a7f5eSAndroid Build Coastguard Worker * This function should not be called from inside a kernel, or from any function 36*344a7f5eSAndroid Build Coastguard Worker * that may be called directly or indirectly from a kernel. Doing so would cause a 37*344a7f5eSAndroid Build Coastguard Worker * runtime error. 38*344a7f5eSAndroid Build Coastguard Worker * 39*344a7f5eSAndroid Build Coastguard Worker * Parameters: 40*344a7f5eSAndroid Build Coastguard Worker * a: Allocation to work on. 41*344a7f5eSAndroid Build Coastguard Worker */ 42*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 16)) 43*344a7f5eSAndroid Build Coastguard Workerextern void __attribute__((overloadable)) 44*344a7f5eSAndroid Build Coastguard Worker rsAllocationIoReceive(rs_allocation a); 45*344a7f5eSAndroid Build Coastguard Worker#endif 46*344a7f5eSAndroid Build Coastguard Worker 47*344a7f5eSAndroid Build Coastguard Worker/* 48*344a7f5eSAndroid Build Coastguard Worker * rsAllocationIoSend: Send new content to the queue 49*344a7f5eSAndroid Build Coastguard Worker * 50*344a7f5eSAndroid Build Coastguard Worker * Send the contents of the Allocation to the queue. 51*344a7f5eSAndroid Build Coastguard Worker * 52*344a7f5eSAndroid Build Coastguard Worker * This function should not be called from inside a kernel, or from any function 53*344a7f5eSAndroid Build Coastguard Worker * that may be called directly or indirectly from a kernel. Doing so would cause a 54*344a7f5eSAndroid Build Coastguard Worker * runtime error. 55*344a7f5eSAndroid Build Coastguard Worker * 56*344a7f5eSAndroid Build Coastguard Worker * Parameters: 57*344a7f5eSAndroid Build Coastguard Worker * a: Allocation to work on. 58*344a7f5eSAndroid Build Coastguard Worker */ 59*344a7f5eSAndroid Build Coastguard Worker#if (defined(RS_VERSION) && (RS_VERSION >= 16)) 60*344a7f5eSAndroid Build Coastguard Workerextern void __attribute__((overloadable)) 61*344a7f5eSAndroid Build Coastguard Worker rsAllocationIoSend(rs_allocation a); 62*344a7f5eSAndroid Build Coastguard Worker#endif 63*344a7f5eSAndroid Build Coastguard Worker 64*344a7f5eSAndroid Build Coastguard Worker/* 65*344a7f5eSAndroid Build Coastguard Worker * rsSendToClient: Send a message to the client, non-blocking 66*344a7f5eSAndroid Build Coastguard Worker * 67*344a7f5eSAndroid Build Coastguard Worker * Sends a message back to the client. This call does not block. 68*344a7f5eSAndroid Build Coastguard Worker * It returns true if the message was sent and false if the 69*344a7f5eSAndroid Build Coastguard Worker * message queue is full. 70*344a7f5eSAndroid Build Coastguard Worker * 71*344a7f5eSAndroid Build Coastguard Worker * A message ID is required. The data payload is optional. 72*344a7f5eSAndroid Build Coastguard Worker * 73*344a7f5eSAndroid Build Coastguard Worker * See RenderScript.RSMessageHandler. 74*344a7f5eSAndroid Build Coastguard Worker * 75*344a7f5eSAndroid Build Coastguard Worker * Parameters: 76*344a7f5eSAndroid Build Coastguard Worker * data: Application specific data. 77*344a7f5eSAndroid Build Coastguard Worker * len: Length of the data, in bytes. 78*344a7f5eSAndroid Build Coastguard Worker */ 79*344a7f5eSAndroid Build Coastguard Workerextern bool __attribute__((overloadable)) 80*344a7f5eSAndroid Build Coastguard Worker rsSendToClient(int cmdID); 81*344a7f5eSAndroid Build Coastguard Worker 82*344a7f5eSAndroid Build Coastguard Workerextern bool __attribute__((overloadable)) 83*344a7f5eSAndroid Build Coastguard Worker rsSendToClient(int cmdID, const void* data, uint len); 84*344a7f5eSAndroid Build Coastguard Worker 85*344a7f5eSAndroid Build Coastguard Worker/* 86*344a7f5eSAndroid Build Coastguard Worker * rsSendToClientBlocking: Send a message to the client, blocking 87*344a7f5eSAndroid Build Coastguard Worker * 88*344a7f5eSAndroid Build Coastguard Worker * Sends a message back to the client. This function will block 89*344a7f5eSAndroid Build Coastguard Worker * until there is room on the message queue for this message. 90*344a7f5eSAndroid Build Coastguard Worker * This function may return before the message was delivered and 91*344a7f5eSAndroid Build Coastguard Worker * processed by the client. 92*344a7f5eSAndroid Build Coastguard Worker * 93*344a7f5eSAndroid Build Coastguard Worker * A message ID is required. The data payload is optional. 94*344a7f5eSAndroid Build Coastguard Worker * 95*344a7f5eSAndroid Build Coastguard Worker * See RenderScript.RSMessageHandler. 96*344a7f5eSAndroid Build Coastguard Worker * 97*344a7f5eSAndroid Build Coastguard Worker * Parameters: 98*344a7f5eSAndroid Build Coastguard Worker * data: Application specific data. 99*344a7f5eSAndroid Build Coastguard Worker * len: Length of the data, in bytes. 100*344a7f5eSAndroid Build Coastguard Worker */ 101*344a7f5eSAndroid Build Coastguard Workerextern void __attribute__((overloadable)) 102*344a7f5eSAndroid Build Coastguard Worker rsSendToClientBlocking(int cmdID); 103*344a7f5eSAndroid Build Coastguard Worker 104*344a7f5eSAndroid Build Coastguard Workerextern void __attribute__((overloadable)) 105*344a7f5eSAndroid Build Coastguard Worker rsSendToClientBlocking(int cmdID, const void* data, uint len); 106*344a7f5eSAndroid Build Coastguard Worker 107*344a7f5eSAndroid Build Coastguard Worker#endif // RENDERSCRIPT_RS_IO_RSH 108