资源简介
QNX实时系统源代码 ,希望大家一起学习,主要是分享,2分就可以。qnx主要用于车载电子产品的软件平台。
代码片段和文件信息
/*
* $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 $“);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 24 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\arm\a.be\Makefile
文件 24 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\arm\a.le\Makefile
文件 127 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\arm\Makefile
文件 24 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\arm\so.be\Makefile
文件 24 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\arm\so.le\Makefile
文件 2171 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\asyncmsg_channel_create.c
文件 1999 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\asyncmsg_channel_destroy.c
文件 5039 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\asyncmsg_connect_attach.c
文件 1540 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\asyncmsg_connect_attr.c
文件 2525 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\asyncmsg_connect_detach.c
文件 1372 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\asyncmsg_flush.c
文件 946 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\asyncmsg_free.c
文件 3024 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\asyncmsg_get.c
文件 953 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\asyncmsg_malloc.c
文件 1736 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\asyncmsg_priv.h
文件 2701 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\asyncmsg_put.c
文件 753 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\common.mk
文件 28 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\Makefile
文件 24 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\mips\a.be\Makefile
文件 24 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\mips\a.le\Makefile
文件 127 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\mips\Makefile
文件 24 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\mips\so.be\Makefile
文件 24 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\mips\so.le\Makefile
文件 963 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\module.tmpl
文件 24 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\ppc\a.be\Makefile
文件 127 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\ppc\Makefile
文件 24 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\ppc\so.be\Makefile
文件 24 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\sh\a.le\Makefile
文件 128 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\sh\Makefile
文件 24 2007-11-07 00:11 实时操作系统qnx源码\lib\asyncmsg\sh\so.le\Makefile
............此处省略11115个文件信息
- 上一篇:5个BBS 网站 源码
- 下一篇:汇编语言(王爽) 最好的汇编入门书籍
相关资源
- 5个BBS 网站 源码
-
xm
l存储系统,源码,详细注释 - Discuz 最新版本
- ROS机器人编程实践_源码
- pyqt5windows生成二维工具源码
- 数字金融整站源码+虚拟币交易+自动挖
- opencv3 神经网络字母识别源码.zip
- VTK图形图像开发进阶源码
- SignalR完整源码
- HEVC/H265 最新源码
- 文件加密AxCrypt源码附带cryptlib包与Z
- 电子书网站源码
- linux2.6.1内核源码注释
- tesseract3.02 vs2012 工程源码
- zw_jhn199388-9911706-基于51单片机都_自动
- 价值200的12网素材解析源码程序-已经
- 美容院会员管理系统源码(含微信端
- 视频网站源码
- duilib+cef3源码
- FlyBox企业网盘和ERP源码,可整合
- 《iOS网络编程与云端应用最佳实践》
- 在线客服系统源码
- Raize FOR XE10 源码版本 亲测好用
- OpenGL超级宝典完整源码(第五版)
- 微信商城系统源码---.NET平台
- QtitanRibbon含源码 试用版
- 人才系统源码
- Qt实现中文输入法面板集成谷歌输入法
- 安卓蓝牙app源码
- 自己写了一个火车票售卖系统,实现
评论
共有 条评论