Update of /cvsroot/simplemail/simplemail/gtk
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv32748/gtk
Modified Files:
subthreads.c
Log Message:
Document thread_call_function_sync_v() and return 1 to indicate success.
Index: subthreads.c
===================================================================
RCS file: /cvsroot/simplemail/simplemail/gtk/subthreads.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- subthreads.c 24 Dec 2013 09:25:09 -0000 1.51
+++ subthreads.c 24 Dec 2013 09:25:29 -0000 1.52
@@ -332,11 +332,23 @@
return 0;
}
+/**
+ * Call a function in the context of the thread.
+ *
+ * @param thread
+ * @param rc pointer where the return value of the function is stored.
+ * @param function
+ * @param argcount
+ * @param argptr
+ * @return whether the function was invoked or not.
+ */
static int thread_call_function_sync_v(thread_t thread, uintptr_t *rc, void *function, int argcount, va_list argptr)
{
struct thread_call_function_sync_data data;
int i;
+ SM_ENTER;
+
assert(argcount < THREAD_CALL_FUNCTION_SYNC_DATA_NUM_ARGS);
data.function = (int (*)(void))function;
@@ -351,7 +363,8 @@
if (rc) *rc = data.rc;
- return 0;
+ SM_RETURN(1,"%d");
+ return 1;
}
int thread_call_function_sync(thread_t thread, void *function, int argcount, ...)
|