move sig callback pointer to the span so it can be called from a function

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@1015 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Anthony Minessale
2010-02-01 18:16:13 +00:00
parent f1140c352d
commit 000b7e78b2
14 changed files with 87 additions and 62 deletions

View File

@@ -2735,6 +2735,26 @@ OZ_DECLARE(zap_status_t) zap_span_start(zap_span_t *span)
return ZAP_FAIL;
}
OZ_DECLARE(zap_status_t) zap_span_send_signal(zap_span_t *span, zap_sigmsg_t *sigmsg)
{
zap_status_t status = ZAP_FAIL;
if (span->signal_cb) {
if (sigmsg->channel) {
zap_mutex_lock(sigmsg->channel->mutex);
}
status = span->signal_cb(sigmsg);
if (sigmsg->channel) {
zap_mutex_unlock(sigmsg->channel->mutex);
}
}
return status;
}
OZ_DECLARE(zap_status_t) zap_global_init(void)
{