summaryrefslogtreecommitdiff
path: root/pjlib/src/pjlib-test/ioq_perf.c
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-04-30 21:03:32 +0000
committerBenny Prijono <bennylp@teluu.com>2007-04-30 21:03:32 +0000
commit9bfdd11aac28c934ce580880837cce948d9be10a (patch)
treee0414666d0e0b7b7ac99adb0125acf7b988b8428 /pjlib/src/pjlib-test/ioq_perf.c
parent25830dbc54149caeb660f1f379e547ed9eb09159 (diff)
Initial Symbian integration to trunk for pjlib
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1235 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pjlib-test/ioq_perf.c')
-rw-r--r--pjlib/src/pjlib-test/ioq_perf.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/pjlib/src/pjlib-test/ioq_perf.c b/pjlib/src/pjlib-test/ioq_perf.c
index adffc11c..cb8e8270 100644
--- a/pjlib/src/pjlib-test/ioq_perf.c
+++ b/pjlib/src/pjlib-test/ioq_perf.c
@@ -72,7 +72,7 @@ static void on_read_complete(pj_ioqueue_key_t *key,
pj_ioqueue_op_key_t *op_key,
pj_ssize_t bytes_read)
{
- test_item *item = pj_ioqueue_get_user_data(key);
+ test_item *item = (test_item*)pj_ioqueue_get_user_data(key);
pj_status_t rc;
int data_is_available = 1;
@@ -150,7 +150,7 @@ static void on_write_complete(pj_ioqueue_key_t *key,
pj_ioqueue_op_key_t *op_key,
pj_ssize_t bytes_sent)
{
- test_item *item = pj_ioqueue_get_user_data(key);
+ test_item *item = (test_item*) pj_ioqueue_get_user_data(key);
//TRACE_((THIS_FILE, " write complete: sent = %d", bytes_sent));
@@ -188,7 +188,7 @@ struct thread_arg
/* The worker thread. */
static int worker_thread(void *p)
{
- struct thread_arg *arg = p;
+ struct thread_arg *arg = (struct thread_arg*) p;
const pj_time_val timeout = {0, 100};
int rc;
@@ -249,8 +249,9 @@ static int perform_test(int sock_type, const char *type_name,
if (!pool)
return -10;
- items = pj_pool_alloc(pool, sockpair_cnt*sizeof(test_item));
- thread = pj_pool_alloc(pool, thread_cnt*sizeof(pj_thread_t*));
+ items = (test_item*) pj_pool_alloc(pool, sockpair_cnt*sizeof(test_item));
+ thread = (pj_thread_t**)
+ pj_pool_alloc(pool, thread_cnt*sizeof(pj_thread_t*));
TRACE_((THIS_FILE, " creating ioqueue.."));
rc = pj_ioqueue_create(pool, sockpair_cnt*2, &ioqueue);
@@ -265,8 +266,8 @@ static int perform_test(int sock_type, const char *type_name,
items[i].ioqueue = ioqueue;
items[i].buffer_size = buffer_size;
- items[i].outgoing_buffer = pj_pool_alloc(pool, buffer_size);
- items[i].incoming_buffer = pj_pool_alloc(pool, buffer_size);
+ items[i].outgoing_buffer = (char*) pj_pool_alloc(pool, buffer_size);
+ items[i].incoming_buffer = (char*) pj_pool_alloc(pool, buffer_size);
items[i].bytes_recv = items[i].bytes_sent = 0;
/* randomize outgoing buffer. */
@@ -331,7 +332,7 @@ static int perform_test(int sock_type, const char *type_name,
for (i=0; i<thread_cnt; ++i) {
struct thread_arg *arg;
- arg = pj_pool_zalloc(pool, sizeof(*arg));
+ arg = (thread_arg*) pj_pool_zalloc(pool, sizeof(*arg));
arg->id = i;
arg->ioqueue = ioqueue;
arg->counter = 0;