2 * Copyright (C) 2016 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 // Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh.
20 * rs_io.rsh: Input/Output Functions
22 * These functions are used to:
23 * - Send information to the Java client, and
24 * - Send the processed allocation or receive the next allocation to process.
27 #ifndef RENDERSCRIPT_RS_IO_RSH
28 #define RENDERSCRIPT_RS_IO_RSH
31 * rsAllocationIoReceive: Receive new content from the queue
33 * Receive a new set of contents from the queue.
35 * This function should not be called from inside a kernel, or from any function
36 * that may be called directly or indirectly from a kernel. Doing so would cause a
40 * a: Allocation to work on.
42 #if (defined(RS_VERSION) && (RS_VERSION >= 16))
43 extern void __attribute__((overloadable))
44 rsAllocationIoReceive(rs_allocation a);
48 * rsAllocationIoSend: Send new content to the queue
50 * Send the contents of the Allocation to the queue.
52 * This function should not be called from inside a kernel, or from any function
53 * that may be called directly or indirectly from a kernel. Doing so would cause a
57 * a: Allocation to work on.
59 #if (defined(RS_VERSION) && (RS_VERSION >= 16))
60 extern void __attribute__((overloadable))
61 rsAllocationIoSend(rs_allocation a);
65 * rsSendToClient: Send a message to the client, non-blocking
67 * Sends a message back to the client. This call does not block.
68 * It returns true if the message was sent and false if the
69 * message queue is full.
71 * A message ID is required. The data payload is optional.
73 * See RenderScript.RSMessageHandler.
76 * data: Application specific data.
77 * len: Length of the data, in bytes.
79 extern bool __attribute__((overloadable))
80 rsSendToClient(int cmdID);
82 extern bool __attribute__((overloadable))
83 rsSendToClient(int cmdID, const void* data, uint len);
86 * rsSendToClientBlocking: Send a message to the client, blocking
88 * Sends a message back to the client. This function will block
89 * until there is room on the message queue for this message.
90 * This function may return before the message was delivered and
91 * processed by the client.
93 * A message ID is required. The data payload is optional.
95 * See RenderScript.RSMessageHandler.
98 * data: Application specific data.
99 * len: Length of the data, in bytes.
101 extern void __attribute__((overloadable))
102 rsSendToClientBlocking(int cmdID);
104 extern void __attribute__((overloadable))
105 rsSendToClientBlocking(int cmdID, const void* data, uint len);
107 #endif // RENDERSCRIPT_RS_IO_RSH