Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Update packaging
[src/app-framework-binder.git]
/
src
/
tests
/
test-thread.c
diff --git
a/src/tests/test-thread.c
b/src/tests/test-thread.c
index
30e27a2
..
d3ce08c
100644
(file)
--- a/
src/tests/test-thread.c
+++ b/
src/tests/test-thread.c
@@
-81,7
+81,7
@@
void terminate(int signum)
exit(0);
}
exit(0);
}
-
int main
()
+
void start
()
{
int i;
struct foo *foo;
{
int i;
struct foo *foo;
@@
-89,7
+89,6
@@
int main()
struct timespec ts;
req.itf = &itf;
struct timespec ts;
req.itf = &itf;
- jobs_init(4, 0, 20000);
for (i = 0 ; i < 10000 ; i++) {
req.closure = foo = malloc(sizeof *foo);
foo->value = i;
for (i = 0 ; i < 10000 ; i++) {
req.closure = foo = malloc(sizeof *foo);
foo->value = i;
@@
-97,18
+96,26
@@
int main()
afb_thread_req_call(req, process, 5, (&ts) + (i % 7));
unref(foo);
if (i == 5000)
afb_thread_req_call(req, process, 5, (&ts) + (i % 7));
unref(foo);
if (i == 5000)
-#if 0
- jobs_invoke0(0, terminate);
-#else
jobs_queue0(NULL, 0, terminate);
jobs_queue0(NULL, 0, terminate);
-#endif
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
// nanosleep(&ts, NULL);
}
ts.tv_sec = 0;
ts.tv_nsec = 1000000;
// nanosleep(&ts, NULL);
}
- return -jobs_add_me();
}
}
+int main()
+{
+ int i;
+ struct foo *foo;
+ struct afb_req req;
+ struct timespec ts;
+
+ req.itf = &itf;
+ jobs_start(4, 0, 20000, start);
+ return 1;
+}
+
+