亚洲欧美第一页_禁久久精品乱码_粉嫩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久久99久久精品国产片果冻 | 成人午夜激情片| 91女人视频在线观看| 欧美一区二区精品| 亚洲精品亚洲人成人网| 国产一区二区三区香蕉| 欧美剧情电影在线观看完整版免费励志电影| 亚洲精品一区二区三区精华液| 亚洲资源中文字幕| 99久久精品国产导航| 精品成人一区二区三区| 首页国产欧美久久| 欧美性猛片xxxx免费看久爱| 国产精品视频yy9299一区| 麻豆久久久久久久| 91精品国产入口| 亚洲成av人片一区二区三区| 色综合久久中文综合久久牛| 国产精品―色哟哟| 国产河南妇女毛片精品久久久| 91精品国产免费久久综合| 亚洲第一搞黄网站| 日本精品一级二级| 亚洲精品成人少妇| 色香色香欲天天天影视综合网| 国产精品对白交换视频| 粉嫩av亚洲一区二区图片| 久久婷婷国产综合国色天香| 精品在线播放免费| 精品国产一区二区三区久久影院 | 久久免费精品国产久精品久久久久| 午夜精彩视频在线观看不卡| 在线观看91精品国产入口| 亚洲黄色性网站| 91久久精品网| 亚洲成人精品影院| 91精品国产综合久久香蕉的特点| 亚洲超碰精品一区二区| 91麻豆精品国产| 色偷偷成人一区二区三区91 | 91蝌蚪porny| 综合欧美亚洲日本| 色哟哟一区二区三区| 亚洲亚洲精品在线观看| 91精品国产综合久久久久久| 奇米精品一区二区三区四区| 精品久久国产字幕高潮| 国产精品白丝av| 国产精品色婷婷| 欧美亚洲一区三区| 日韩影院精彩在线| 久久综合五月天婷婷伊人| 国产精品一区二区视频| 中文字幕日韩一区| 色老汉av一区二区三区| 日韩高清在线观看| 国产欧美日韩激情| 色av综合在线| 激情六月婷婷综合| 自拍av一区二区三区| 日韩你懂的在线观看| 成人午夜电影小说| 午夜一区二区三区视频| 精品999在线播放| 99re视频精品| 蜜桃视频一区二区三区在线观看| 国产日韩av一区二区| 在线观看日韩毛片| 国内精品嫩模私拍在线| 亚洲精品国产视频| 久久网站最新地址| 欧美日韩在线一区二区| 国产成人精品一区二区三区四区| 亚洲精品成人在线| 国产香蕉久久精品综合网| 色婷婷亚洲综合| 国产精品原创巨作av| 午夜精品久久久久久久99水蜜桃| 国产天堂亚洲国产碰碰| 欧美精品欧美精品系列| 成人av在线影院| 经典三级在线一区| 亚洲成在线观看| 国产精品久久久久国产精品日日 | 91啪在线观看| 国产精品一二二区| 日韩电影在线观看网站| 亚洲精选视频在线| 国产精品色哟哟| 久久一区二区三区国产精品| 欧美午夜影院一区| 972aa.com艺术欧美| 国产精品一区三区| 欧美精品v日韩精品v韩国精品v| 国产精品资源在线| 麻豆精品国产传媒mv男同| 亚洲一区二区3| 亚洲欧美日韩国产综合| 国产欧美日韩不卡| 久久亚洲免费视频| 欧美xxx久久| 精品入口麻豆88视频| 777午夜精品视频在线播放| 欧美视频中文字幕| 欧美自拍偷拍午夜视频| 色综合久久久久久久| 97精品电影院| 91网上在线视频| 91视频在线观看| 色综合色狠狠天天综合色| 91在线码无精品| 色综合天天视频在线观看| 99视频一区二区三区| av亚洲产国偷v产偷v自拍| 99免费精品在线| 91视视频在线观看入口直接观看www | 欧美日韩国产不卡| 欧美日韩中文国产| 欧美日韩一区二区在线观看| 欧美日韩一区二区三区在线| 欧美日韩黄视频| 日韩一区二区在线观看视频| 欧美一区二区视频在线观看2022 | 久久久久久久久伊人| 欧美精品一区二区不卡| 国产日产亚洲精品系列| 中文字幕五月欧美| 亚洲一区二区在线免费观看视频| 亚洲一区欧美一区| 日本中文字幕一区二区视频 | 午夜视频在线观看一区二区 | 日韩一区二区在线观看| 精品国一区二区三区| 久久精品日产第一区二区三区高清版 | 在线成人av网站| 日韩女优av电影在线观看| 国产日韩欧美精品电影三级在线| 国产精品乱码一区二区三区软件| 亚洲色图另类专区| 日韩主播视频在线| 国产精品一品二品| 91久久人澡人人添人人爽欧美| 欧美久久免费观看| 日本一区二区三区在线不卡| 亚洲欧洲综合另类| 美腿丝袜亚洲一区| 国产91露脸合集magnet| 欧美在线观看一区二区| 精品国产91亚洲一区二区三区婷婷| 国产精品美女久久久久aⅴ| 亚洲高清三级视频| 国产成人亚洲综合色影视| 欧美三级一区二区| 国产欧美日韩综合精品一区二区| 一区二区三区在线高清| 激情都市一区二区| 欧洲一区二区av| 久久综合九色综合欧美98| 亚洲精品成人精品456| 国产伦理精品不卡| 欧美日韩精品欧美日韩精品| 国产欧美日本一区二区三区| 亚洲国产日韩精品| a在线播放不卡| 精品少妇一区二区三区视频免付费| 亚洲精品高清视频在线观看| 精品一区二区三区欧美| 欧美日韩一区二区在线视频| 国产精品区一区二区三区| 免播放器亚洲一区| 99国产精品视频免费观看| 2020日本不卡一区二区视频| 午夜视频在线观看一区二区| 91视频一区二区| 中文字幕乱码久久午夜不卡| 日本vs亚洲vs韩国一区三区二区 | 国产成人午夜视频| 欧美一区二区三区免费在线看| 亚洲免费av高清| 成人性生交大片免费看中文| 精品国产区一区| 日本欧美大码aⅴ在线播放| 在线免费观看一区| 亚洲日本在线视频观看| 成人性色生活片| 国产欧美一区二区三区鸳鸯浴| 久久精品国产99久久6| 欧美精品久久天天躁| 91麻豆免费观看| 国产欧美日韩另类视频免费观看| 激情综合一区二区三区| 欧美成人精品1314www| 日韩成人伦理电影在线观看| 67194成人在线观看| 天堂一区二区在线| 欧美一区二区私人影院日本| 天天做天天摸天天爽国产一区| 欧美三区在线视频| 日韩电影免费一区| 日韩色在线观看|