Commit 2cd371cb authored by Martti Mela's avatar Martti Mela

su_pthread_port.c: supporting Open C mutex initializer

darcs-hash:20070430115153-1b897-e2028a7c44b2b5303106ee624126539778a4300f.gz
parent 30305cb1
......@@ -217,7 +217,11 @@ int su_pthreaded_port_start(su_port_create_f *create,
/* init: */ NULL,
/* deinit: */ NULL,
/* mutex: */ { PTHREAD_MUTEX_INITIALIZER },
#if HAVE_OPEN_C
/* cv: */ { _ENeedsNormalInit, NULL },
#else
/* cv: */ { PTHREAD_COND_INITIALIZER },
#endif
/* retval: */ -1,
/* clone: */ SU_MSG_R_INIT,
};
......@@ -451,11 +455,19 @@ int su_pthread_port_execute(su_task_r const task,
{
int success;
su_msg_r m = SU_MSG_R_INIT;
#if HAVE_OPEN_C
struct su_pthread_port_execute frame = {
{ PTHREAD_MUTEX_INITIALIZER },
{ _ENeedsNormalInit, NULL },
function, arg, 0
};
#else
struct su_pthread_port_execute frame = {
{ PTHREAD_MUTEX_INITIALIZER },
{ PTHREAD_COND_INITIALIZER },
function, arg, 0
};
#endif
if (su_msg_create(m, task, su_task_null,
_su_pthread_port_execute, (sizeof &frame)) < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment