QNX官方源代码,从SVN上拉取的,方便学习用。
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2009-11-26 23:29 qnx
文件 62 2007-11-07 08:18 qnxMakefile
目录 0 2007-11-06 23:20 qnxlib
文件 130 2007-11-07 08:14 qnxlibMakefile
目录 0 2007-11-07 00:11 qnxlibasyncmsg
文件 28 2007-11-07 00:11 qnxlibasyncmsgMakefile
文件 2812 2007-11-07 00:11 qnxlibasyncmsg\_asyncmsg_handle.c
目录 0 2007-11-07 00:11 qnxlibasyncmsgarm
文件 127 2007-11-07 00:11 qnxlibasyncmsgarmMakefile
目录 0 2007-11-07 00:11 qnxlibasyncmsgarma.be
文件 24 2007-11-07 00:11 qnxlibasyncmsgarma.beMakefile
目录 0 2007-11-07 00:11 qnxlibasyncmsgarma.le
文件 24 2007-11-07 00:11 qnxlibasyncmsgarma.leMakefile
目录 0 2007-11-07 00:11 qnxlibasyncmsgarmso.be
文件 24 2007-11-07 00:11 qnxlibasyncmsgarmso.beMakefile
目录 0 2007-11-07 00:11 qnxlibasyncmsgarmso.le
文件 24 2007-11-07 00:11 qnxlibasyncmsgarmso.leMakefile
文件 2171 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_channel_create.c
文件 1999 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_channel_destroy.c
文件 5039 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_connect_attach.c
文件 1540 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_connect_attr.c
文件 2525 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_connect_detach.c
文件 1372 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_flush.c
文件 946 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_free.c
文件 3024 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_get.c
文件 953 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_malloc.c
文件 1736 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_priv.h
文件 2701 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_put.c
文件 753 2007-11-07 00:11 qnxlibasyncmsgcommon.mk
目录 0 2007-11-07 00:11 qnxlibasyncmsgmips
文件 127 2007-11-07 00:11 qnxlibasyncmsgmipsMakefile
............此处省略11111个文件信息
/*
* $QNXLicenseC:
* Copyright 2007 QNX Software Systems. All Rights Reserved.
*
* You must obtain a written license from and pay applicable license fees to QNX
* Software Systems before you may reproduce modify or distribute this software
* or any work that includes all or part of this software. Free development
* licenses are available for evaluation and non-commercial purposes. For more
* information visit http://licensing.qnx.com or email licensing@qnx.com.
*
* This file may contain contributions from others. Please review this entire
* file for other proprietary rights or license notices as well as the QNX
* Development Suite License Guide at http://licensing.qnx.com/license-guide/
* for other information.
* $
*/
#include
#include
#include “asyncmsg_priv.h“
/* This is painful. We have to prepare receive buf and associate
* it with the chid so we will know where to receive
*/
int asyncmsg_channel_create(unsigned flags mode_t mode size_t buffer_size unsigned max_num_buffer const struct sigevent *ev int (*recvbuf_callback)(size_t bufsize unsigned num_bufs void*bufs[] int flags))
{
struct _asyncmsg_channel_context *acc;
int chid;
if ((acc = (struct _asyncmsg_channel_context *)malloc(sizeof(*acc))) == NULL) {
return -1;
}
memset(acc 0 sizeof(*acc));
if ((errno = pthread_mutex_init(&acc->mutex 0)) != EOK) {
free(acc);
return -1;
}
acc->recvbuf_cb = recvbuf_callback;
acc->max_num_buffer = max_num_buffer;
acc->buffer_size = buffer_size;
if ((acc->iovs = malloc(sizeof(iov_t) * max_num_buffer)) == NULL) {
free(acc);
return -1;
}
if ((chid = ChannelCreateExt(flags | _NTO_CHF_ASYNC mode buffer_size max_num_buffer ev NULL)) == -1) {
pthread_mutex_destroy(&acc->mutex);
free(acc->iovs);
free(acc);
return -1;
}
if (_asyncmsg_handle(chid _ASYNCMSG_HANDLE_ADD | _ASYNCMSG_HANDLE_CHANNEL acc) == NULL) {
asyncmsg_channel_destroy(chid);
free(acc->iovs);
free(acc);
return -1;
}
return chid;
}
__SRCVERSION(“asyncmsg_channel_create.c $Rev: 153052 $“);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2009-11-26 23:29 qnx
文件 62 2007-11-07 08:18 qnxMakefile
目录 0 2007-11-06 23:20 qnxlib
文件 130 2007-11-07 08:14 qnxlibMakefile
目录 0 2007-11-07 00:11 qnxlibasyncmsg
文件 28 2007-11-07 00:11 qnxlibasyncmsgMakefile
文件 2812 2007-11-07 00:11 qnxlibasyncmsg\_asyncmsg_handle.c
目录 0 2007-11-07 00:11 qnxlibasyncmsgarm
文件 127 2007-11-07 00:11 qnxlibasyncmsgarmMakefile
目录 0 2007-11-07 00:11 qnxlibasyncmsgarma.be
文件 24 2007-11-07 00:11 qnxlibasyncmsgarma.beMakefile
目录 0 2007-11-07 00:11 qnxlibasyncmsgarma.le
文件 24 2007-11-07 00:11 qnxlibasyncmsgarma.leMakefile
目录 0 2007-11-07 00:11 qnxlibasyncmsgarmso.be
文件 24 2007-11-07 00:11 qnxlibasyncmsgarmso.beMakefile
目录 0 2007-11-07 00:11 qnxlibasyncmsgarmso.le
文件 24 2007-11-07 00:11 qnxlibasyncmsgarmso.leMakefile
文件 2171 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_channel_create.c
文件 1999 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_channel_destroy.c
文件 5039 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_connect_attach.c
文件 1540 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_connect_attr.c
文件 2525 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_connect_detach.c
文件 1372 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_flush.c
文件 946 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_free.c
文件 3024 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_get.c
文件 953 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_malloc.c
文件 1736 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_priv.h
文件 2701 2007-11-07 00:11 qnxlibasyncmsgasyncmsg_put.c
文件 753 2007-11-07 00:11 qnxlibasyncmsgcommon.mk
目录 0 2007-11-07 00:11 qnxlibasyncmsgmips
文件 127 2007-11-07 00:11 qnxlibasyncmsgmipsMakefile
............此处省略11111个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)