亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tm1if_pc.c

?? PNX系列設備驅動 PNX系列設備驅動
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*
 *  COPYRIGHT (c) 1995 by Philips Semiconductors
 *
 *   +-----------------------------------------------------------------+
 *   | THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED |
 *   | AND COPIED IN ACCORDANCE WITH THE TERMS AND CONDITIONS OF SUCH  |
 *   | A LICENSE AND WITH THE INCLUSION OF THE THIS COPY RIGHT NOTICE. |
 *   | THIS SOFTWARE OR ANY OTHER COPIES OF THIS SOFTWARE MAY NOT BE   |
 *   | PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON. THE   |
 *   | OWNERSHIP AND TITLE OF THIS SOFTWARE IS NOT TRANSFERRED.        |
 *   +-----------------------------------------------------------------+
 *
 *  Module name              : TM1IF_pc.c    1.7
 *
 *  Last update              : 11:04:54 - 99/03/29
 *
 *  Title                    : PC version of HostCall server, PC part
 *
 *  Reviewed                 : 
 *
 *  Revision history         : 
 *
 *  Description              :  
 *
 *            This module is part of an implementation of the server part  
 *            for a HostCall interface. HostCall is the software component 
 *            which is required by the TCS toolset to adapt the programs 
 *            generated by this toolset to a specific host (see file 
 *            HostCall.h in the TCS include dir).
 *
 *            HostIF is the part of the implementation which runs on the
 *            host, serving all IO requests of the TM-1 application. 
 *            HostIF is one of two modules of this host-resident part, and
 *            defines all host specific issues which are communication
 *            with the target and the ability to start a number of server
 *            tasks. The other part, RPCClient, defines *how* messages 
 *            should be served; RPCClient it still is host independent.
 *
 *            RPCServ is the counterpart of RPCClient on the target, and
 *            TM1IF is the counterpart of HostIF on the target. However,
 *            contrary to the target situation, where RPCClient is built
 *            on top of HostIF, on the host side TM1IF is built on top of
 *            RPCServ. Hence TM1IF forms the external interface of the 
 *            server pair.
 *
 *            The interface to this module is as follows: First, it should
 *            be initialised. Second, a number of nodes should be defined, 
 *            specifying node specific information. 
 *            After this, the nodes can be started and a communication
 *            session with these nodes can be started by means of function
 *            TM1IF_start_serving; depending on the implementation, a call
 *            to this function either immediately returns, with a number
 *            of serving tasks created for handling target's IO requests,
 *            or it blocks until function TM1IF_term is called (typically
 *            by the exit handler, when the last node has reported termination).
 *
 *            Having a pool of servers reduces the possibility that serving
 *            is halted due to serving requests which take a longer 
 *            time to complete. For instance, when running pSOS on the 
 *            target with one task requesting keyboard input from the host, 
 *            the current implementation of RPCClient will stop serving 
 *            requests when only one server task is selected: while blocked 
 *            on the keyboard, it will not be able to serve requests from 
 *            other pSOS tasks. 
 *            The current host (with the OS used) might or might not be
 *            able to dispatch multiple tasks, so start_serving returns
 *            one of the following results:
 *                - TM1IF_Serving_Failed
 *                           Initialisation (e.g. setup of target
 *                           communication, or server task creation) 
 *                           failed.
 *                - TM1IF_Serving_Started
 *                           The servers have been created, and
 *                           are now busy serving.
 *                           Serving should be stopped using the
 *                           TM1IF_term function.
 *                - TM1IF_Serving_Completed
 *                           TM1IF was not capable of creating independent 
 *                           serving tasks, so the TM-1 application
 *                           has been entirely served during the call
 *                           to start_serving.
 *           
 *            NB: This interface does not provide for loading and
 *                starting the TM1 appication. 
 *
 *            This module forms a Windows 95 implementation of
 *            the TM1IF interface. It is capable of creating multiple
 *            server tasks. The communication is implemented on top of
 *            the Trimedia Manager interface, of which it reserves 
 *            Channel #1.
 */

/*---------------------------- Includes --------------------------------------*/

#include <windows.h>
#include <winioctl.h>
#include <time.h>
#include <sys/timeb.h>
#include <signal.h>


#include <stdarg.h>
#include <assert.h>
#include <math.h>
#include <string.h>
#include <setjmp.h>
#include <sys/types.h>
#include <errno.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>


#include "tmtypes.h"
#include "tmmanerr.h"
#include "tmmanapi.h"
#include "HostCall.h"
#include "RPC_Common.h"
#include "TM1IF.h"
#include "io.h"
#include "Lib_Local.h"

/*---------------------------- Module State ----------------------------------*/


#define NROF_SERVERS      4


/*
 * Various global state:
 */
static Int32    nrof_created_servers;
static HANDLE  *created_servers;

static Bool     same_endian;

static HANDLE   MessageSynchHandle;


typedef struct {
    DWORD     dsp_number;
    DWORD     dsp_handle;
    DWORD     hostcall_channel;
    Bool      valid;
} NodeData;


static NodeData *nodedata;
static Int       nrof_dsps;


/*--------------------------- Exported Functions -----------------------------*/


    static Bool serving_stopped;


    static void 
    serve()
    {
	int         i;
	while (!serving_stopped) {
		tmmanPacket Packet;

		WaitForSingleObject(MessageSynchHandle, INFINITE);

		for (i = 0; i < nrof_dsps; i++) {
			if (serving_stopped) {

				/*
				 * Pass termination event:
				 */
				SetEvent(MessageSynchHandle);
				return;
			}
			else if (nodedata[i].valid
				 && tmmanMessageReceive(nodedata[i].hostcall_channel, &Packet) == statusSuccess
				) {
				Pointer     raw_command;
				HostCall_command *command;

				/*
				 * Let next task check for next message:
				 */
				SetEvent(MessageSynchHandle);

				raw_command = Packet.Argument[0];
				command = RPCServ_raw_to_host(raw_command);

				command->notification_status = HostCall_BUSY;

				if (RPCServ_serve(raw_command)) {
					tmmanMessageSend(nodedata[i].hostcall_channel, &Packet);
				}
			}
		}
	}
    }


/*
 * Function         : Start serving the (independently started)
 *                    TM-1 application. Serving should use the specified
 *                    IO functions, and use the specified file descriptors
 *                    for stdin, stdout and stderr. It should try to 
 *                    start the requested number of serving tasks and return,
 *                    but when there are no capabilities for starting 
 *                    tasks this function itself can act as server before
 *                    it returns.
 * Function Result  : see module header
 * Precondition     : -
 * Postcondition    : -
 * Sideeffects      : -
 */

TM1IF_Served_Status
        TM1IF_start_serving( )
{
    Int32 i;

    nrof_created_servers = 0;
    created_servers      = malloc( NROF_SERVERS * sizeof(HANDLE) );

    if (created_servers == NULL) {
	return TM1IF_Serving_Failed;
    }

    for (i=1; i <= NROF_SERVERS; i++) {
	HANDLE dummy;
	HANDLE new_thread;

	new_thread= CreateThread ( NULL, 0, (LPTHREAD_START_ROUTINE)serve, 0, 0, (LPDWORD)&dummy );

	if (new_thread != NULL) {
	    created_servers[nrof_created_servers++]= new_thread;
	}
    }

    if (nrof_created_servers > 0) {
	return TM1IF_Serving_Started;
    } else {
	return TM1IF_Serving_Failed;
    } 
}




/*
 * Function         : Initialise this module, and make the
 *                    I/O callback functions known to it.
 * Parameters       : open .. exit        (I) IO functions.
 *                    endian              (I) node's endianness
 * Function Result  : True iff initialisation succeeded
 */

Bool TM1IF_init(
	RPCServ_OpenFunc    open,
	RPCServ_OpenDllFunc open_dll,
	RPCServ_CloseFunc   close,
	RPCServ_ReadFunc    read,
	RPCServ_WriteFunc   write,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线一区二区视频| 99视频有精品| 日韩三级视频在线看| 香蕉久久夜色精品国产使用方法| 欧美亚洲国产一区二区三区| 亚洲成人av中文| 日韩午夜电影av| 国产精品亚洲成人| 中文无字幕一区二区三区| 本田岬高潮一区二区三区| 一区二区中文视频| 欧美色区777第一页| 日韩黄色小视频| 久久久噜噜噜久久人人看 | 日本久久电影网| 樱桃国产成人精品视频| 欧美日韩国产一级二级| 亚洲成av人片在www色猫咪| 日韩网站在线看片你懂的| 国产精品中文有码| 亚洲三级理论片| 日韩欧美色综合网站| 国产精品一二三四五| 亚洲婷婷在线视频| 777色狠狠一区二区三区| 久久爱www久久做| 专区另类欧美日韩| 制服丝袜亚洲色图| 国产黄人亚洲片| 一区二区三区在线观看欧美| 3atv在线一区二区三区| 国产老肥熟一区二区三区| 一区二区三区在线视频观看| 欧美一区二区视频在线观看2020 | 五月综合激情婷婷六月色窝| 欧美精品一区二区三区蜜桃视频| 成人av在线影院| 日韩成人午夜电影| 亚洲日本在线天堂| 精品欧美一区二区在线观看| 波多野结衣视频一区| 久久er99精品| 亚洲国产精品视频| 亚洲国产精品ⅴa在线观看| 欧美日韩国产综合一区二区 | 亚洲欧洲性图库| 欧美成人精精品一区二区频| 欧洲一区在线电影| 成人精品国产福利| 久久国产精品99精品国产| 亚洲精品免费在线播放| 精品播放一区二区| 欧美肥大bbwbbw高潮| 一本大道久久a久久综合婷婷| 国产麻豆精品视频| 奇米影视一区二区三区| 亚洲一区二区免费视频| 中文字幕一区二区视频| 久久久精品免费免费| 日韩一区二区三区视频在线观看| 91黄色激情网站| 91免费版pro下载短视频| 国产高清精品在线| 韩国成人精品a∨在线观看| 亚洲第一成年网| 一区二区三区视频在线观看| 国产精品区一区二区三区 | 亚洲精品在线电影| 51午夜精品国产| 欧美午夜片在线观看| 99re这里都是精品| 粗大黑人巨茎大战欧美成人| 国产一区在线看| 久久精品免费观看| 免费成人在线观看| 青青草原综合久久大伊人精品 | 亚洲欧美一区二区视频| 欧美激情一区二区三区四区| 久久美女高清视频| 亚洲精品一区二区三区99| 日韩一区二区三区免费看| 欧美另类一区二区三区| 欧美三级一区二区| 欧美日韩国产系列| 3d动漫精品啪啪| 日韩一级二级三级精品视频| 欧美欧美午夜aⅴ在线观看| 欧美日韩一级二级| 欧美一区在线视频| 日韩欧美电影在线| 日韩精品一区在线观看| 精品福利av导航| 久久精品视频在线免费观看| 久久久亚洲午夜电影| 国产精品美女www爽爽爽| 国产精品成人在线观看| 亚洲视频你懂的| 亚洲一区二区三区视频在线播放| 亚洲国产精品久久不卡毛片| 亚洲一区二区三区影院| 日日骚欧美日韩| 精品一二三四区| 成人黄色软件下载| 欧美在线|欧美| 日韩一区二区不卡| 亚洲国产精品t66y| 亚洲中国最大av网站| 日日摸夜夜添夜夜添精品视频 | 不卡影院免费观看| 色婷婷激情久久| 日韩免费高清电影| 国产精品亲子乱子伦xxxx裸| 亚洲精品大片www| 日韩电影在线免费观看| 国产精品影视在线| 色综合久久久久久久久久久| 欧美日韩成人在线一区| 337p粉嫩大胆噜噜噜噜噜91av | 亚洲色图欧洲色图| 蜜桃视频在线观看一区| 成人免费av在线| 欧美日韩国产小视频在线观看| 精品三级在线看| 亚洲精品一二三区| 韩日精品视频一区| 欧美日韩和欧美的一区二区| 久久精品夜色噜噜亚洲aⅴ| 亚洲欧洲成人自拍| 免费成人av在线| 99九九99九九九视频精品| 69av一区二区三区| 国产精品欧美一级免费| 亚洲成精国产精品女| 国产高清不卡二三区| 欧美日本在线播放| 日韩伦理av电影| 九一久久久久久| 欧美撒尿777hd撒尿| 国产女人18水真多18精品一级做| 午夜精品福利在线| aaa欧美大片| 久久影院午夜片一区| 天天av天天翘天天综合网色鬼国产| 国产精品 欧美精品| 日韩亚洲欧美一区| 一个色妞综合视频在线观看| 国产精品1024| 精品日产卡一卡二卡麻豆| 亚洲影视资源网| 菠萝蜜视频在线观看一区| 精品免费国产二区三区 | 久久99精品国产.久久久久久 | 五月天视频一区| 91蜜桃网址入口| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 欧美精品一二三| 亚洲欧美另类图片小说| 高清免费成人av| 久久影音资源网| 美腿丝袜亚洲三区| 555www色欧美视频| 日韩av在线发布| 91精品国产全国免费观看| 首页国产欧美日韩丝袜| 在线免费观看视频一区| 亚洲色图一区二区三区| 99这里只有精品| 国产精品久久久久久久久动漫| 国产一区二区三区黄视频| 欧美成人女星排行榜| 老司机午夜精品99久久| 欧美一区二区播放| 蜜臀a∨国产成人精品| 日韩午夜av电影| 激情文学综合网| 久久免费国产精品| 国产成人精品在线看| 欧美激情一区二区三区在线| 成人综合婷婷国产精品久久| 中文字幕va一区二区三区| 成人精品免费视频| 亚洲人成亚洲人成在线观看图片| 91麻豆国产自产在线观看| 亚洲激情第一区| 在线播放/欧美激情| 日本vs亚洲vs韩国一区三区二区| 7777精品伊人久久久大香线蕉经典版下载| 亚洲成人av电影| 日韩免费观看2025年上映的电影| 麻豆一区二区三| 久久久久久久久岛国免费| 成人av网在线| 亚洲男人电影天堂| 欧美日韩一区二区三区四区五区| 亚洲成人免费在线| 日韩午夜中文字幕| 成人黄色小视频| 亚洲国产一区在线观看| 精品福利一区二区三区 | 91蜜桃视频在线|