summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2010-07-29 17:31:14 -0700
committerJason Sams <rjsams@android.com>2010-07-29 19:10:25 -0700
commitf0690c4f29f3c6fbff2fd5a9cc6d3ff028e1e066 (patch)
tree81bf45c5d18e9c8b69e13e8d5310936dc6946216
parent8f5d160c92bb03a9156301e0577fa590f1ce0199 (diff)
downloadframeworks_base-f0690c4f29f3c6fbff2fd5a9cc6d3ff028e1e066.zip
frameworks_base-f0690c4f29f3c6fbff2fd5a9cc6d3ff028e1e066.tar.gz
frameworks_base-f0690c4f29f3c6fbff2fd5a9cc6d3ff028e1e066.tar.bz2
Cleanup of signed/unsigned
Make all functions overloadable. Change-Id: I443c83afcf9a7acfae394585201f081681f309db Update examples. Change-Id: I100d6fa8dd1af376bcee0b2c42c5aabe9c03bb6e force rebuild of all .rs files to pick up core header changes. Change-Id: I6231a8a024388481ca231507e83b108ebdbc3500
-rw-r--r--CleanSpec.mk1
-rw-r--r--libs/rs/java/Fountain/src/com/android/fountain/FountainRS.java2
-rw-r--r--libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java3
-rw-r--r--libs/rs/rsScriptC_Lib.cpp45
-rw-r--r--libs/rs/rsScriptC_LibGL.cpp47
-rw-r--r--libs/rs/scriptc/rs_graphics.rsh91
-rw-r--r--libs/rs/scriptc/rs_math.rsh122
7 files changed, 179 insertions, 132 deletions
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 1efe77c..1b7daa6 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -67,6 +67,7 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libequalizerte
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libreverb_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libreverbtest_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/soundfx/)
+$(call add-clean-step, find . -type f -name "*.rs" -print0 | xargs -0 touch)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
diff --git a/libs/rs/java/Fountain/src/com/android/fountain/FountainRS.java b/libs/rs/java/Fountain/src/com/android/fountain/FountainRS.java
index 3cfb457..bff7273 100644
--- a/libs/rs/java/Fountain/src/com/android/fountain/FountainRS.java
+++ b/libs/rs/java/Fountain/src/com/android/fountain/FountainRS.java
@@ -22,7 +22,7 @@ import android.util.Log;
public class FountainRS {
- public static final int PART_COUNT = 20000;
+ public static final int PART_COUNT = 50000;
public FountainRS() {
}
diff --git a/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java b/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
index 606bfa8..24ef547 100644
--- a/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
+++ b/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
@@ -292,12 +292,11 @@ public class ImageProcessingActivity extends Activity
mRS.finish();
} else {
javaFilter();
+ mDisplayView.invalidate();
}
t = java.lang.System.currentTimeMillis() - t;
android.util.Log.v("Img", "Renderscript frame time core ms " + t);
-
- mDisplayView.invalidate();
}
}
diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp
index ccdde00..dc30afc 100644
--- a/libs/rs/rsScriptC_Lib.cpp
+++ b/libs/rs/rsScriptC_Lib.cpp
@@ -184,17 +184,9 @@ static int64_t SC_uptimeMillis()
return nanoseconds_to_milliseconds(systemTime(SYSTEM_TIME_MONOTONIC));
}
-static int64_t SC_startTimeMillis()
+static int64_t SC_uptimeNanos()
{
- GET_TLS();
- return sc->mEnviroment.mStartTimeMillis;
-}
-
-static int64_t SC_elapsedTimeMillis()
-{
- GET_TLS();
- return nanoseconds_to_milliseconds(systemTime(SYSTEM_TIME_MONOTONIC))
- - sc->mEnviroment.mStartTimeMillis;
+ return systemTime(SYSTEM_TIME_MONOTONIC);
}
static float SC_getDt()
@@ -400,7 +392,6 @@ static ScriptCState::SymbolTable_t gSyms[] = {
{ "_Z14rsGetElementAt13rs_allocationjj", (void *)&SC_getElementAtXY },
{ "_Z14rsGetElementAt13rs_allocationjjj", (void *)&SC_getElementAtXYZ },
-
// Debug
{ "_Z7rsDebugPKcf", (void *)&SC_debugF },
{ "_Z7rsDebugPKcDv2_f", (void *)&SC_debugFv2 },
@@ -409,8 +400,6 @@ static ScriptCState::SymbolTable_t gSyms[] = {
{ "_Z7rsDebugPKci", (void *)&SC_debugI32 },
{ "_Z7rsDebugPKcj", (void *)&SC_debugU32 },
{ "_Z7rsDebugPKcPKv", (void *)&SC_debugP },
- //extern void __attribute__((overloadable))rsDebug(const char *, const void *);
-
// RS Math
{ "_Z6rsRandi", (void *)&SC_randi },
@@ -420,27 +409,15 @@ static ScriptCState::SymbolTable_t gSyms[] = {
{ "_Z6rsFracf", (void *)&SC_frac },
// time
- { "_Z8rsSecond", (void *)&SC_second },
- { "_Z8rsMinute", (void *)&SC_minute },
- { "_Z6rsHour", (void *)&SC_hour },
- { "_Z5rsDay", (void *)&SC_day },
- { "_Z7rsMonth", (void *)&SC_month },
- { "_Z6rsYear", (void *)&SC_year },
- { "_Z14rsUptimeMillis", (void*)&SC_uptimeMillis },
- { "_Z17rsStartTimeMillis", (void*)&SC_startTimeMillis },
- { "_Z19rsElapsedTimeMillis", (void*)&SC_elapsedTimeMillis },
- { "_Z7rsGetDt", (void*)&SC_getDt },
-
- { "rsSecond", (void *)&SC_second },
- { "rsMinute", (void *)&SC_minute },
- { "rsHour", (void *)&SC_hour },
- { "rsDay", (void *)&SC_day },
- { "rsMonth", (void *)&SC_month },
- { "rsYear", (void *)&SC_year },
- { "rsUptimeMillis", (void*)&SC_uptimeMillis },
- { "rsStartTimeMillis", (void*)&SC_startTimeMillis },
- { "rsElapsedTimeMillis", (void*)&SC_elapsedTimeMillis },
- { "rsGetDt", (void*)&SC_getDt },
+ { "_Z8rsSecondv", (void *)&SC_second },
+ { "_Z8rsMinutev", (void *)&SC_minute },
+ { "_Z6rsHourv", (void *)&SC_hour },
+ { "_Z5rsDayv", (void *)&SC_day },
+ { "_Z7rsMonthv", (void *)&SC_month },
+ { "_Z6rsYearv", (void *)&SC_year },
+ { "_Z14rsUptimeMillisv", (void*)&SC_uptimeMillis },
+ { "_Z13rsUptimeNanosv", (void*)&SC_uptimeNanos },
+ { "_Z7rsGetDtv", (void*)&SC_getDt },
{ "_Z14rsSendToClienti", (void *)&SC_toClient },
{ "_Z14rsSendToClientiPKvj", (void *)&SC_toClient2 },
diff --git a/libs/rs/rsScriptC_LibGL.cpp b/libs/rs/rsScriptC_LibGL.cpp
index bed0fce..06638ac 100644
--- a/libs/rs/rsScriptC_LibGL.cpp
+++ b/libs/rs/rsScriptC_LibGL.cpp
@@ -354,44 +354,43 @@ static void SC_BindFont(RsFont font)
// ::= d # double
static ScriptCState::SymbolTable_t gSyms[] = {
- { "rsgBindProgramFragment", (void *)&SC_bindProgramFragment },
- { "rsgBindProgramStore", (void *)&SC_bindProgramStore },
- { "rsgBindProgramVertex", (void *)&SC_bindProgramVertex },
- { "rsgBindProgramRaster", (void *)&SC_bindProgramRaster },
- { "rsgBindSampler", (void *)&SC_bindSampler },
- { "rsgBindTexture", (void *)&SC_bindTexture },
+ { "_Z22rsgBindProgramFragment19rs_program_fragment", (void *)&SC_bindProgramFragment },
+ { "_Z19rsgBindProgramStore16rs_program_store", (void *)&SC_bindProgramStore },
+ { "_Z20rsgBindProgramVertex17rs_program_vertex", (void *)&SC_bindProgramVertex },
+ { "_Z20rsgBindProgramRaster17rs_program_raster", (void *)&SC_bindProgramRaster },
+ { "_Z14rsgBindSampler19rs_program_fragmentj10rs_sampler", (void *)&SC_bindSampler },
+ { "_Z14rsgBindTexture19rs_program_fragmentj13rs_allocation", (void *)&SC_bindTexture },
- { "rsgProgramVertexLoadProjectionMatrix", (void *)&SC_vpLoadProjectionMatrix },
- { "rsgProgramVertexLoadModelMatrix", (void *)&SC_vpLoadModelMatrix },
- { "rsgProgramVertexLoadTextureMatrix", (void *)&SC_vpLoadTextureMatrix },
+ { "_Z36rsgProgramVertexLoadProjectionMatrixPK12rs_matrix4x4", (void *)&SC_vpLoadProjectionMatrix },
+ { "_Z31rsgProgramVertexLoadModelMatrixPK12rs_matrix4x4", (void *)&SC_vpLoadModelMatrix },
+ { "_Z33rsgProgramVertexLoadTextureMatrixPK12rs_matrix4x4", (void *)&SC_vpLoadTextureMatrix },
- { "rsgGetWidth", (void *)&SC_getWidth },
- { "rsgGetHeight", (void *)&SC_getHeight },
+ { "_Z11rsgGetWidthv", (void *)&SC_getWidth },
+ { "_Z12rsgGetHeightv", (void *)&SC_getHeight },
- { "_Z18rsgUploadToTexture13rs_allocationi", (void *)&SC_uploadToTexture2 },
+ { "_Z18rsgUploadToTexture13rs_allocationj", (void *)&SC_uploadToTexture2 },
{ "_Z18rsgUploadToTexture13rs_allocation", (void *)&SC_uploadToTexture },
- { "rsgUploadToBufferObject", (void *)&SC_uploadToBufferObject },
+ { "_Z23rsgUploadToBufferObject13rs_allocation", (void *)&SC_uploadToBufferObject },
- { "rsgDrawRect", (void *)&SC_drawRect },
- { "rsgDrawQuad", (void *)&SC_drawQuad },
- { "rsgDrawQuadTexCoords", (void *)&SC_drawQuadTexCoords },
- //{ "drawSprite", (void *)&SC_drawSprite },
- { "rsgDrawSpriteScreenspace", (void *)&SC_drawSpriteScreenspace },
+ { "_Z11rsgDrawRectfffff", (void *)&SC_drawRect },
+ { "_Z11rsgDrawQuadffffffffffff", (void *)&SC_drawQuad },
+ { "_Z20rsgDrawQuadTexCoordsffffffffffffffffffff", (void *)&SC_drawQuadTexCoords },
+ { "_Z24rsgDrawSpriteScreenspacefffff", (void *)&SC_drawSpriteScreenspace },
{ "_Z11rsgDrawMesh7rs_mesh", (void *)&SC_drawMesh },
- { "_Z11rsgDrawMesh7rs_meshi", (void *)&SC_drawMeshPrimitive },
- { "_Z11rsgDrawMesh7rs_meshiii", (void *)&SC_drawMeshPrimitiveRange },
+ { "_Z11rsgDrawMesh7rs_meshj", (void *)&SC_drawMeshPrimitive },
+ { "_Z11rsgDrawMesh7rs_meshjjj", (void *)&SC_drawMeshPrimitiveRange },
- { "rsgClearColor", (void *)&SC_ClearColor },
- { "rsgClearDepth", (void *)&SC_ClearDepth },
+ { "_Z13rsgClearColorffff", (void *)&SC_ClearColor },
+ { "_Z13rsgClearDepthf", (void *)&SC_ClearDepth },
{ "_Z11rsgDrawTextPKcii", (void *)&SC_DrawText },
{ "_Z11rsgDrawText13rs_allocationii", (void *)&SC_DrawTextAlloc },
- { "rsgBindFont", (void *)&SC_BindFont },
+ { "_Z11rsgBindFont7rs_font", (void *)&SC_BindFont },
// misc
- { "color", (void *)&SC_color },
+ { "_Z5colorffff", (void *)&SC_color },
{ NULL, NULL }
};
diff --git a/libs/rs/scriptc/rs_graphics.rsh b/libs/rs/scriptc/rs_graphics.rsh
index d6ef6e9..8f89cba 100644
--- a/libs/rs/scriptc/rs_graphics.rsh
+++ b/libs/rs/scriptc/rs_graphics.rsh
@@ -4,47 +4,78 @@
#include "rs_math.rsh"
-// context
-extern void rsgBindProgramFragment(rs_program_fragment);
-extern void rsgBindProgramStore(rs_program_store);
-extern void rsgBindProgramVertex(rs_program_vertex);
-extern void rsgBindProgramRaster(rs_program_raster);
+// Bind a ProgramFragment to the RS context.
+extern void __attribute__((overloadable))
+ rsgBindProgramFragment(rs_program_fragment);
+extern void __attribute__((overloadable))
+ rsgBindProgramStore(rs_program_store);
+extern void __attribute__((overloadable))
+ rsgBindProgramVertex(rs_program_vertex);
+extern void __attribute__((overloadable))
+ rsgBindProgramRaster(rs_program_raster);
-extern void rsgBindSampler(rs_program_fragment, int slot, rs_sampler);
-extern void rsgBindTexture(rs_program_fragment, int slot, rs_allocation);
+extern void __attribute__((overloadable))
+ rsgBindSampler(rs_program_fragment, uint slot, rs_sampler);
+extern void __attribute__((overloadable))
+ rsgBindTexture(rs_program_fragment, uint slot, rs_allocation);
-extern void rsgProgramVertexLoadProjectionMatrix(const rs_matrix4x4 *);
-extern void rsgProgramVertexLoadModelMatrix(const rs_matrix4x4 *);
-extern void rsgProgramVertexLoadTextureMatrix(const rs_matrix4x4 *);
+extern void __attribute__((overloadable))
+ rsgProgramVertexLoadProjectionMatrix(const rs_matrix4x4 *);
+extern void __attribute__((overloadable))
+ rsgProgramVertexLoadModelMatrix(const rs_matrix4x4 *);
+extern void __attribute__((overloadable))
+ rsgProgramVertexLoadTextureMatrix(const rs_matrix4x4 *);
-extern int rsgGetWidth();
-extern int rsgGetHeight();
+extern uint __attribute__((overloadable))
+ rsgGetWidth(void);
+extern uint __attribute__((overloadable))
+ rsgGetHeight(void);
-extern void __attribute__((overloadable)) rsgUploadToTexture(rs_allocation);
-extern void __attribute__((overloadable)) rsgUploadToTexture(rs_allocation, int mipLevel);
-extern void rsgUploadToBufferObject(rs_allocation);
-//extern void rsgUploadMesh(rs_mesh);
+extern void __attribute__((overloadable))
+ rsgUploadToTexture(rs_allocation);
+extern void __attribute__((overloadable))
+ rsgUploadToTexture(rs_allocation, uint mipLevel);
+extern void __attribute__((overloadable))
+ rsgUploadToBufferObject(rs_allocation);
-extern void rsgDrawRect(float x1, float y1, float x2, float y2, float z);
-extern void rsgDrawQuad(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3, float x4, float y4, float z4);
-extern void rsgDrawQuadTexCoords(float x1, float y1, float z1, float u1, float v1, float x2, float y2, float z2, float u2, float v2, float x3, float y3, float z3, float u3, float v3, float x4, float y4, float z4, float u4, float v4);
-//extern void rsgDrawSprite(float x, float y, float z, float w, float h);
-extern void rsgDrawSpriteScreenspace(float x, float y, float z, float w, float h);
+extern void __attribute__((overloadable))
+ rsgDrawRect(float x1, float y1, float x2, float y2, float z);
+extern void __attribute__((overloadable))
+ rsgDrawQuad(float x1, float y1, float z1,
+ float x2, float y2, float z2,
+ float x3, float y3, float z3,
+ float x4, float y4, float z4);
+extern void __attribute__((overloadable))
+ rsgDrawQuadTexCoords(float x1, float y1, float z1, float u1, float v1,
+ float x2, float y2, float z2, float u2, float v2,
+ float x3, float y3, float z3, float u3, float v3,
+ float x4, float y4, float z4, float u4, float v4);
+extern void __attribute__((overloadable))
+ rsgDrawSpriteScreenspace(float x, float y, float z, float w, float h);
-extern void __attribute__((overloadable)) rsgDrawMesh(rs_mesh ism);
-extern void __attribute__((overloadable)) rsgDrawMesh(rs_mesh ism, int primitiveIndex);
-extern void __attribute__((overloadable)) rsgDrawMesh(rs_mesh ism, int primitiveIndex, int start, int len);
+extern void __attribute__((overloadable))
+ rsgDrawMesh(rs_mesh ism);
+extern void __attribute__((overloadable))
+ rsgDrawMesh(rs_mesh ism, uint primitiveIndex);
+extern void __attribute__((overloadable))
+ rsgDrawMesh(rs_mesh ism, uint primitiveIndex, uint start, uint len);
-extern void rsgClearColor(float, float, float, float);
-extern void rsgClearDepth(float);
+extern void __attribute__((overloadable))
+ rsgClearColor(float, float, float, float);
+extern void __attribute__((overloadable))
+ rsgClearDepth(float);
-extern void __attribute__((overloadable)) rsgDrawText(const char *, int x, int y);
-extern void __attribute__((overloadable)) rsgDrawText(rs_allocation, int x, int y);
-extern void rsgBindFont(rs_font);
+extern void __attribute__((overloadable))
+ rsgDrawText(const char *, int x, int y);
+extern void __attribute__((overloadable))
+ rsgDrawText(rs_allocation, int x, int y);
+extern void __attribute__((overloadable))
+ rsgBindFont(rs_font);
///////////////////////////////////////////////////////
// misc
-extern void color(float, float, float, float);
+extern void __attribute__((overloadable))
+ color(float, float, float, float);
#endif
diff --git a/libs/rs/scriptc/rs_math.rsh b/libs/rs/scriptc/rs_math.rsh
index 309a952..66171d8 100644
--- a/libs/rs/scriptc/rs_math.rsh
+++ b/libs/rs/scriptc/rs_math.rsh
@@ -4,11 +4,14 @@
#include "rs_cl.rsh"
#include "rs_core.rsh"
-
-
// Allocations
+
+// Return the rs_allocation associated with a bound data
+// pointer.
extern rs_allocation __attribute__((overloadable))
rsGetAllocation(const void *);
+
+// Return the dimensions associated with an allocation.
extern uint32_t __attribute__((overloadable))
rsAllocationGetDimX(rs_allocation);
extern uint32_t __attribute__((overloadable))
@@ -20,6 +23,7 @@ extern uint32_t __attribute__((overloadable))
extern uint32_t __attribute__((overloadable))
rsAllocationGetDimFaces(rs_allocation);
+// Extract a single element from an allocation.
extern const void * __attribute__((overloadable))
rsGetElementAt(rs_allocation, uint32_t x);
extern const void * __attribute__((overloadable))
@@ -28,41 +32,79 @@ extern const void * __attribute__((overloadable))
rsGetElementAt(rs_allocation, uint32_t x, uint32_t y, uint32_t z);
-// Debugging
-extern void __attribute__((overloadable))rsDebug(const char *, float);
-extern void __attribute__((overloadable))rsDebug(const char *, float2);
-extern void __attribute__((overloadable))rsDebug(const char *, float3);
-extern void __attribute__((overloadable))rsDebug(const char *, float4);
-extern void __attribute__((overloadable))rsDebug(const char *, int);
-extern void __attribute__((overloadable))rsDebug(const char *, uint);
-extern void __attribute__((overloadable))rsDebug(const char *, const void *);
+// Debugging, print to the LOG a description string and a value.
+extern void __attribute__((overloadable))
+ rsDebug(const char *, float);
+extern void __attribute__((overloadable))
+ rsDebug(const char *, float2);
+extern void __attribute__((overloadable))
+ rsDebug(const char *, float3);
+extern void __attribute__((overloadable))
+ rsDebug(const char *, float4);
+extern void __attribute__((overloadable))
+ rsDebug(const char *, int);
+extern void __attribute__((overloadable))
+ rsDebug(const char *, uint);
+extern void __attribute__((overloadable))
+ rsDebug(const char *, const void *);
#define RS_DEBUG(a) rsDebug(#a, a)
#define RS_DEBUG_MARKER rsDebug(__FILE__, __LINE__)
-// RS Math
-extern int __attribute__((overloadable))rsRand(int);
-extern int __attribute__((overloadable))rsRand(int, int);
-extern float __attribute__((overloadable))rsRand(float);
-extern float __attribute__((overloadable))rsRand(float, float);
-
-extern float __attribute__((overloadable)) rsFrac(float);
+// Return a random value between 0 (or min_value) and max_malue.
+extern int __attribute__((overloadable))
+ rsRand(int max_value);
+extern int __attribute__((overloadable))
+ rsRand(int min_value, int max_value);
+extern float __attribute__((overloadable))
+ rsRand(float max_value);
+extern float __attribute__((overloadable))
+ rsRand(float min_value, float max_value);
+
+// return the fractional part of a float
+// min(v - ((int)floor(v)), 0x1.fffffep-1f);
+extern float __attribute__((overloadable))
+ rsFrac(float);
// time
-extern int32_t /*__attribute__((overloadable))*/rsSecond();
-extern int32_t /*__attribute__((overloadable))*/rsMinute();
-extern int32_t /*__attribute__((overloadable))*/rsHour();
-extern int32_t /*__attribute__((overloadable))*/rsDay();
-extern int32_t /*__attribute__((overloadable))*/rsMonth();
-extern int32_t /*__attribute__((overloadable))*/rsYear();
-extern int64_t /*__attribute__((overloadable))*/rsUptimeMillis();
-extern int64_t /*__attribute__((overloadable))*/rsStartTimeMillis();
-extern int64_t /*__attribute__((overloadable))*/rsElapsedTimeMillis();
-extern float /*__attribute__((overloadable))*/rsGetDt();
-
-extern bool __attribute__((overloadable))rsSendToClient(int cmdID);
-extern bool __attribute__((overloadable))rsSendToClient(int cmdID, const void *data, uint len);
-extern void __attribute__((overloadable))rsSendToClientBlocking(int cmdID);
-extern void __attribute__((overloadable))rsSendToClientBlocking(int cmdID, const void *data, uint len);
+extern int32_t __attribute__((overloadable))
+ rsSecond(void);
+extern int32_t __attribute__((overloadable))
+ rsMinute(void);
+extern int32_t __attribute__((overloadable))
+ rsHour(void);
+extern int32_t __attribute__((overloadable))
+ rsDay(void);
+extern int32_t __attribute__((overloadable))
+ rsMonth(void);
+extern int32_t __attribute__((overloadable))
+ rsYear(void);
+
+// Return the current system clock in milliseconds
+extern int64_t __attribute__((overloadable))
+ rsUptimeMillis(void);
+
+// Return the current system clock in nanoseconds
+extern int64_t __attribute__((overloadable))
+ rsUptimeNanos(void);
+
+// Return the time in seconds since function was last called in this script.
+extern float __attribute__((overloadable))
+ rsGetDt(void);
+
+// Send a message back to the client. Will not block and returns true
+// if the message was sendable and false if the fifo was full.
+// A message ID is required. Data payload is optional.
+extern bool __attribute__((overloadable))
+ rsSendToClient(int cmdID);
+extern bool __attribute__((overloadable))
+ rsSendToClient(int cmdID, const void *data, uint len);
+
+// Send a message back to the client, blocking until the message is queued.
+// A message ID is required. Data payload is optional.
+extern void __attribute__((overloadable))
+ rsSendToClientBlocking(int cmdID);
+extern void __attribute__((overloadable))
+ rsSendToClientBlocking(int cmdID, const void *data, uint len);
// Script to Script
typedef struct rs_script_call {
@@ -77,15 +119,13 @@ typedef struct rs_script_call {
} rs_script_call_t;
-extern void __attribute__((overloadable))rsForEach(rs_script script,
- rs_allocation input,
- rs_allocation output,
- const void * usrData);
+extern void __attribute__((overloadable))
+ rsForEach(rs_script script, rs_allocation input,
+ rs_allocation output, const void * usrData);
-extern void __attribute__((overloadable))rsForEach(rs_script script,
- rs_allocation input,
- rs_allocation output,
- const void * usrData,
- const rs_script_call_t *);
+extern void __attribute__((overloadable))
+ rsForEach(rs_script script, rs_allocation input,
+ rs_allocation output, const void * usrData,
+ const rs_script_call_t *);
#endif